mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use hashing function in tests
This commit is contained in:
parent
c70ebfd241
commit
8b166c3636
@ -10070,9 +10070,9 @@ BOOST_AUTO_TEST_CASE(function_types_sig)
|
||||
}
|
||||
)";
|
||||
compileAndRun(sourceCode, 0, "C");
|
||||
BOOST_CHECK(callContractFunction("f()") == fromHex("0x26121ff0"));
|
||||
BOOST_CHECK(callContractFunction("g()") == fromHex("0x26121ff0"));
|
||||
BOOST_CHECK(callContractFunction("h()") == fromHex("0x26121ff0"));
|
||||
BOOST_CHECK(callContractFunction("f()") == encodeArgs(asString(FixedHash<4>(dev::keccak256("f()")).asBytes())));
|
||||
BOOST_CHECK(callContractFunction("g()") == encodeArgs(asString(FixedHash<4>(dev::keccak256("f()")).asBytes())));
|
||||
BOOST_CHECK(callContractFunction("h()") == encodeArgs(asString(FixedHash<4>(dev::keccak256("f()")).asBytes())));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
Loading…
Reference in New Issue
Block a user