Reorganize semantic tests for calldata and abicoder#16483
Conversation
6095512 to
f20af71
Compare
|
In any case, this test could be covering some ancient, long fixed bug, but in isolation it looks a bit worthless and weird (why unused |
rodiazet
left a comment
There was a problem hiding this comment.
LGTM. Some comments or rather questions added and I proposed to move one test.
There was a problem hiding this comment.
This test is a copy of test/libsolidity/semanticTests/array/calldata_array_bounds_check_nested_bytes.sol Shouldn't this be moved to test/libsolidity/semanticTests/abicoder/calldataDecoding/array
There was a problem hiding this comment.
This test is a copy of
test/libsolidity/semanticTests/array/calldata_array_bounds_check_nested_bytes.sol
Yes, that's why I kept only one of them.
Shouldn't this be moved to
test/libsolidity/semanticTests/abicoder/calldataDecoding/array
Well, we have many tests that would fit in more than one place. When it comes to calldata arrays, for example, there is a big overlap between array behavior and calldata decoding. This case IMO is more about the former. The test checks that accessing an element past the end of the array reverts. This is not specific to calldata and happens with all kinds of arrays (note that it's Panic, not Error).
f20af71 to
d45a45e
Compare
d45a45e to
0df51f7
Compare
Still not sure what to do about it, but for now I decided to move it to |
0df51f7 to
8b17183
Compare
- The test does seem to pass now via both pipelines.
8b17183 to
511cdc0
Compare
This is just a refactor in preparation for fixing a bug in calldata validation. I needed to figure out what we have coverage for and since our tests for this are all over the place, I did some renaming and reorganization of the test dirs.
Summary of changes:
abiEncodeDecode/,abiEncoderV1/,abiEncoderV2/,calldata/undersemanticTests/all had random subsets of ABI encoding and calldata tests. I merged them all into a singleabicoder/dir with subdirs for validation, cleanup, structs, arrays, etc. Also moved some tests fromarrays/andstructs/there.abicoderpragma cover both v1 and v2 since isoltest inserts a pragma depending on whether it runs with or without--abiencoderv1. Those with v2 pragma cover only v2. Those with v1 pragma cover v1 via evmasm and v2 via Yul (since the compiler ignores the pragma via Yul).compileViaYul: false. Another mixed tabs and spaces. Etc.