solidity/test/libsolidity/smtCheckerTests/operators/slice_default_end.sol
2023-03-09 14:59:32 +01:00

17 lines
641 B
Solidity

contract C {
function f(bytes calldata b) external pure {
require(b.length == 30);
require(b[10] == 0xff);
require(b[b.length - 1] == 0xaa);
assert(bytes(b[10:]).length == 20); // should hold
// Disabled because of Spacer's nondeterminism.
//assert(bytes(b[10:])[0] == 0xff); // should hold
//assert(bytes(b[10:])[5] == 0xff); // Removed because of Spacer's nondeterminism
//assert(bytes(b[10:])[19] == 0xaa); // Removed because of Spacer nondeterminism
}
}
// ====
// SMTEngine: all
// ----
// Info 1391: CHC: 4 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.