aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-05-20 22:22:31 +0800
committerchriseth <c@ethdev.com>2016-05-20 22:52:40 +0800
commit708129abd5f67838913dd42df590b3b64a825e3a (patch)
treee1062211ac6c28f1b6a3beb6ab26ef0b28e34759 /test
parenta09583a2a49344034e8be22be91a4410f2982781 (diff)
downloaddexon-solidity-708129abd5f67838913dd42df590b3b64a825e3a.tar
dexon-solidity-708129abd5f67838913dd42df590b3b64a825e3a.tar.gz
dexon-solidity-708129abd5f67838913dd42df590b3b64a825e3a.tar.bz2
dexon-solidity-708129abd5f67838913dd42df590b3b64a825e3a.tar.lz
dexon-solidity-708129abd5f67838913dd42df590b3b64a825e3a.tar.xz
dexon-solidity-708129abd5f67838913dd42df590b3b64a825e3a.tar.zst
dexon-solidity-708129abd5f67838913dd42df590b3b64a825e3a.zip
Fixes for invalid cleanups for small types.
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityExpressionCompiler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/libsolidity/SolidityExpressionCompiler.cpp b/test/libsolidity/SolidityExpressionCompiler.cpp
index 398ac24f..967b2907 100644
--- a/test/libsolidity/SolidityExpressionCompiler.cpp
+++ b/test/libsolidity/SolidityExpressionCompiler.cpp
@@ -267,10 +267,10 @@ BOOST_AUTO_TEST_CASE(comparison)
"}\n";
bytes code = compileFirstExpression(sourceCode);
- bytes expectation({byte(Instruction::PUSH1), 0x1,
+ bytes expectation({byte(Instruction::PUSH1), 0x1, byte(Instruction::ISZERO), byte(Instruction::ISZERO),
byte(Instruction::PUSH2), 0x11, 0xaa,
byte(Instruction::PUSH2), 0x10, 0xaa,
- byte(Instruction::LT),
+ byte(Instruction::LT), byte(Instruction::ISZERO), byte(Instruction::ISZERO),
byte(Instruction::EQ),
byte(Instruction::ISZERO)});
BOOST_CHECK_EQUAL_COLLECTIONS(code.begin(), code.end(), expectation.begin(), expectation.end());
@@ -296,7 +296,8 @@ BOOST_AUTO_TEST_CASE(short_circuiting)
byte(Instruction::EQ),
byte(Instruction::ISZERO), // after this we have 9 != 2
byte(Instruction::JUMPDEST),
- byte(Instruction::PUSH1), 0x1,
+ byte(Instruction::ISZERO), byte(Instruction::ISZERO),
+ byte(Instruction::PUSH1), 0x1, byte(Instruction::ISZERO), byte(Instruction::ISZERO),
byte(Instruction::EQ),
byte(Instruction::ISZERO)});
BOOST_CHECK_EQUAL_COLLECTIONS(code.begin(), code.end(), expectation.begin(), expectation.end());