mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Forwarding length check.
This commit is contained in:
parent
0ac4609097
commit
312f422e10
@ -3931,19 +3931,15 @@ BOOST_AUTO_TEST_CASE(call_forward_bytes_length)
|
||||
// No additional data, just function selector
|
||||
ABI_CHECK(callContractFunction("viaCalldata()"), encodeArgs(0x20));
|
||||
// Should be this with 0.5.0: encodeArgs(4));
|
||||
ABI_CHECK(callContractFunction("viaMemory()"), encodeArgs(0x20));
|
||||
// Should be this with 0.5.0: encodeArgs(4));
|
||||
ABI_CHECK(callContractFunction("viaStorage()"), encodeArgs(0x20));
|
||||
// Should be this with 0.5.0: encodeArgs(4));
|
||||
ABI_CHECK(callContractFunction("viaMemory()"), encodeArgs(4));
|
||||
ABI_CHECK(callContractFunction("viaStorage()"), encodeArgs(4));
|
||||
|
||||
// Some additional unpadded data
|
||||
bytes unpadded = asBytes(string("abc"));
|
||||
ABI_CHECK(callContractFunctionNoEncoding("viaCalldata()", unpadded), encodeArgs(0x20));
|
||||
// Should be this with 0.5.0: encodeArgs(7));
|
||||
ABI_CHECK(callContractFunctionNoEncoding("viaMemory()", unpadded), encodeArgs(0x20));
|
||||
// Should be this with 0.5.0: encodeArgs(7));
|
||||
ABI_CHECK(callContractFunctionNoEncoding("viaStorage()", unpadded), encodeArgs(0x20));
|
||||
// Should be this with 0.5.0: encodeArgs(7));
|
||||
ABI_CHECK(callContractFunctionNoEncoding("viaMemory()", unpadded), encodeArgs(7));
|
||||
ABI_CHECK(callContractFunctionNoEncoding("viaStorage()", unpadded), encodeArgs(7));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(copying_bytes_multiassign)
|
||||
|
Loading…
Reference in New Issue
Block a user