mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] additional regression tests
This commit is contained in:
parent
504e4c22b2
commit
2ee0f347b9
11
test/libsolidity/smtCheckerTests/abi/abi_decode_1_tuple.sol
Normal file
11
test/libsolidity/smtCheckerTests/abi/abi_decode_1_tuple.sol
Normal file
@ -0,0 +1,11 @@
|
||||
pragma experimental SMTChecker;
|
||||
contract C {
|
||||
function f(bytes calldata data) external pure returns (uint256[] memory) {
|
||||
return abi.decode(data, (uint256[]));
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 8364: (148-157): Assertion checker does not yet implement type type(uint256[] memory)
|
||||
// Warning 8364: (147-158): Assertion checker does not yet implement type type(uint256[] memory)
|
||||
// Warning 8364: (148-157): Assertion checker does not yet implement type type(uint256[] memory)
|
||||
// Warning 8364: (147-158): Assertion checker does not yet implement type type(uint256[] memory)
|
@ -0,0 +1,9 @@
|
||||
pragma experimental SMTChecker;
|
||||
contract C {
|
||||
function f() public view {
|
||||
abi.encode(this.f);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6031: (86-92): Internal error: Expression undefined for SMT solver.
|
||||
// Warning 6031: (86-92): Internal error: Expression undefined for SMT solver.
|
@ -0,0 +1,9 @@
|
||||
pragma experimental SMTChecker;
|
||||
contract C {
|
||||
function abiEncodeStringLiteral(bytes4 sel) public pure {
|
||||
bytes memory b1 = abi.encodeWithSelector("");
|
||||
require(sel == "");
|
||||
bytes memory b2 = abi.encodeWithSelector(sel);
|
||||
assert(b1.length == b2.length); // should hold
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user