diff options
author | Christian <c@ethdev.com> | 2014-11-01 00:20:27 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-11-01 00:20:27 +0800 |
commit | 2088aaa85b50bdead4ca3fbcd09fb0ed50e30521 (patch) | |
tree | 8dbc231081a6104b2c94eb74017704439d102c1f /solidityExpressionCompiler.cpp | |
parent | c0528f511a78304361384bb43f8b94b9cd14f271 (diff) | |
parent | 882b8ad089820807e7c63d3b5ae4f01aedba4aa8 (diff) | |
download | dexon-solidity-2088aaa85b50bdead4ca3fbcd09fb0ed50e30521.tar.gz dexon-solidity-2088aaa85b50bdead4ca3fbcd09fb0ed50e30521.tar.zst dexon-solidity-2088aaa85b50bdead4ca3fbcd09fb0ed50e30521.zip |
Merge remote-tracking branch 'ethereum/develop' into sol_contractCompiler
Conflicts:
libsolidity/AST.cpp
libsolidity/AST.h
libsolidity/Compiler.cpp
libsolidity/Compiler.h
libsolidity/NameAndTypeResolver.h
libsolidity/Types.cpp
solc/main.cpp
test/solidityCompiler.cpp
Diffstat (limited to 'solidityExpressionCompiler.cpp')
-rw-r--r-- | solidityExpressionCompiler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/solidityExpressionCompiler.cpp b/solidityExpressionCompiler.cpp index 252d2c15..d28628fc 100644 --- a/solidityExpressionCompiler.cpp +++ b/solidityExpressionCompiler.cpp @@ -159,7 +159,7 @@ BOOST_AUTO_TEST_CASE(comparison) byte(eth::Instruction::GT), byte(eth::Instruction::PUSH1), 0x1, byte(eth::Instruction::EQ), - byte(eth::Instruction::NOT)}); + byte(eth::Instruction::ISZERO)}); BOOST_CHECK_EQUAL_COLLECTIONS(code.begin(), code.end(), expectation.begin(), expectation.end()); } @@ -175,18 +175,18 @@ BOOST_AUTO_TEST_CASE(short_circuiting) byte(eth::Instruction::ADD), byte(eth::Instruction::PUSH1), 0x4, byte(eth::Instruction::GT), - byte(eth::Instruction::NOT), // after this we have 10 + 8 >= 4 + byte(eth::Instruction::ISZERO), // after this we have 10 + 8 >= 4 byte(eth::Instruction::DUP1), byte(eth::Instruction::PUSH1), 0x14, byte(eth::Instruction::JUMPI), // short-circuit if it is true byte(eth::Instruction::PUSH1), 0x2, byte(eth::Instruction::PUSH1), 0x9, byte(eth::Instruction::EQ), - byte(eth::Instruction::NOT), // after this we have 2 != 9 + byte(eth::Instruction::ISZERO), // after this we have 2 != 9 byte(eth::Instruction::JUMPDEST), byte(eth::Instruction::PUSH1), 0x1, byte(eth::Instruction::EQ), - byte(eth::Instruction::NOT)}); + byte(eth::Instruction::ISZERO)}); BOOST_CHECK_EQUAL_COLLECTIONS(code.begin(), code.end(), expectation.begin(), expectation.end()); } @@ -228,10 +228,10 @@ BOOST_AUTO_TEST_CASE(unary_operators) bytes expectation({byte(eth::Instruction::PUSH1), 0x1, byte(eth::Instruction::PUSH1), 0x0, byte(eth::Instruction::SUB), - byte(eth::Instruction::BNOT), + byte(eth::Instruction::NOT), byte(eth::Instruction::PUSH1), 0x2, byte(eth::Instruction::EQ), - byte(eth::Instruction::NOT)}); + byte(eth::Instruction::ISZERO)}); BOOST_CHECK_EQUAL_COLLECTIONS(code.begin(), code.end(), expectation.begin(), expectation.end()); } |