solidity/test/libyul/ewasmTranslationTests/comparison_sgt.yul
rodiazet 336b436d3e Add comparison test cases for most of EVM->Ewasm translator
Add comparison test cases for most of EVM->Ewasm translator
2019-12-11 23:23:35 +01:00

55 lines
3.0 KiB
Plaintext

{
sstore(0, sgt(0, 1))
sstore(1, sgt(0, not(0)))
sstore(2, sgt(0, 0))
sstore(3, sgt(1, 2))
sstore(4, sgt(not(0), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe))
sstore(5, sgt(0x8000000000000000000000000000000000000000000000000000000000000000, not(0)))
sstore(6, sgt(not(0), 0x8000000000000000000000000000000000000000000000000000000000000000))
sstore(7, sgt(0x7000000000000000000000000000000000000000000000000000000000000000, 1))
sstore(8, sgt(1, 0x7000000000000000000000000000000000000000000000000000000000000000))
sstore(9, sgt(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, not(0)))
sstore(10, sgt(not(0), 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff))
sstore(11, sgt(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, 1))
sstore(12, sgt(1, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff))
sstore(13, sgt(
0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,
0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
))
sstore(14, sgt(
0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,
0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
))
sstore(15, sgt(
0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,
not(0)
))
sstore(16, sgt(
not(0),
0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
))
sstore(17, sgt(
not(0),
0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
))
sstore(18, sgt(
0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,
not(0)
))
}
// ----
// Trace:
// Memory dump:
// 0: 0000000000000000000000000000000000000000000000000000000000000012
// Storage dump:
// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000001
// 0000000000000000000000000000000000000000000000000000000000000004: 0000000000000000000000000000000000000000000000000000000000000001
// 0000000000000000000000000000000000000000000000000000000000000006: 0000000000000000000000000000000000000000000000000000000000000001
// 0000000000000000000000000000000000000000000000000000000000000007: 0000000000000000000000000000000000000000000000000000000000000001
// 0000000000000000000000000000000000000000000000000000000000000009: 0000000000000000000000000000000000000000000000000000000000000001
// 000000000000000000000000000000000000000000000000000000000000000b: 0000000000000000000000000000000000000000000000000000000000000001
// 000000000000000000000000000000000000000000000000000000000000000d: 0000000000000000000000000000000000000000000000000000000000000001
// 000000000000000000000000000000000000000000000000000000000000000f: 0000000000000000000000000000000000000000000000000000000000000001
// 0000000000000000000000000000000000000000000000000000000000000011: 0000000000000000000000000000000000000000000000000000000000000001