mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Simplify type(S).typehash tests
This commit is contained in:
parent
9e397f90ad
commit
4382dc3d2e
@ -30,18 +30,18 @@ contract C {
|
||||
}
|
||||
|
||||
function f() public pure {
|
||||
assert(type(S1).typehash == keccak256(bytes("S1(uint256 x)")));
|
||||
assert(type(S2).typehash == keccak256(bytes("S2(uint256 x,address y)")));
|
||||
assert(type(S3).typehash == keccak256(bytes("S3(uint256 x,address y,S2 third)S2(uint256 x,address y)")));
|
||||
assert(type(S4).typehash == keccak256(bytes("S4(S3 one,S2 two)S2(uint256 x,address y)S3(uint256 x,address y,S2 third)")));
|
||||
assert(type(S5).typehash == keccak256(bytes("S5(S2 two,S1 one,S3 three,S4[5] four)S1(uint256 x)S2(uint256 x,address y)S3(uint256 x,address y,S2 third)S4(S3 one,S2 two)")));
|
||||
assert(type(S1).typehash == keccak256("S1(uint256 x)"));
|
||||
assert(type(S2).typehash == keccak256("S2(uint256 x,address y)"));
|
||||
assert(type(S3).typehash == keccak256("S3(uint256 x,address y,S2 third)S2(uint256 x,address y)"));
|
||||
assert(type(S4).typehash == keccak256("S4(S3 one,S2 two)S2(uint256 x,address y)S3(uint256 x,address y,S2 third)"));
|
||||
assert(type(S5).typehash == keccak256("S5(S2 two,S1 one,S3 three,S4[5] four)S1(uint256 x)S2(uint256 x,address y)S3(uint256 x,address y,S2 third)S4(S3 one,S2 two)"));
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// SMTEngine: all
|
||||
// ----
|
||||
// Warning 6328: (386-448): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (452-524): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (528-632): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (642-763): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (773-944): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (386-441): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (445-510): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (514-611): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (621-735): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (745-909): CHC: Assertion violation happens here.
|
||||
|
Loading…
Reference in New Issue
Block a user