Commit eff3b5b9 authored by coolhill's avatar coolhill

increase branch coverage for Lib_RLPReader

..by breaking its require(ments). RLP tests from https://github.com/ethereum/tests/tree/develop/RLPTests
parent 4ac74ed9
......@@ -310,6 +310,50 @@
"0xca846b6579348476616c34"
]
]
},
"invalid rlp: not enough bytes for string length": {
"in": ["0xefdebd"],
"revert":"Invalid RLP short list."
},
"invalid rlp: expected string length to be greater than 55": {
"in": ["0xefb83600"],
"revert":"Invalid RLP short list."
},
"invalid rlp: not enough bytes for string": {
"in": ["0xefdebdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"],
"revert":"Invalid RLP long list length."
},
"int32Overflow": {
"in": ["0xbf0f000000000000021111"],
"revert": "Invalid RLP long string."
},
"int32Overflow2": {
"in": ["0xff0f000000000000021111"],
"revert": "Invalid RLP long list."
},
"incorrectLengthInArray": {
"in": ["0xb9002100dc2b275d0f74e8a53e6f4ec61b27f24278820be3f82ea2110e582081b0565df0"],
"revert": "Invalid RLP list value."
},
"leadingZerosInLongLengthArray1": {
"in": ["0xb90040000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f"],
"revert": "Invalid LP list value."
},
"leadingZerosInLongLengthArray2": {
"in": ["0xb800"],
"revert": "Invalid RLP list value."
},
"leadingZerosInLongLengthList1": {
"in": ["0xfb00000040000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f"],
"revert": "Provided RLP list exceeds max list length."
},
"nonOptimalLongLengthArray1": {
"in": ["0xb81000112233445566778899aabbccddeeff"],
"revert": "Invalid RLP list value."
},
"nonOptimalLongLengthArray2": {
"in": ["0xb801ff"],
"revert": "Invalid RLP list value."
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment