aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityCompiler.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-01-08 01:13:03 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-01-08 01:13:03 +0800
commit38cc0b8dd30c003a91918e078493352b2a52998f (patch)
tree2f115a0a0f3eb14c8830c39c7565377645b44ff6 /SolidityCompiler.cpp
parentdeb137f2c41f7011883fec796b63bbe52f5957c1 (diff)
downloaddexon-solidity-38cc0b8dd30c003a91918e078493352b2a52998f.tar.gz
dexon-solidity-38cc0b8dd30c003a91918e078493352b2a52998f.tar.zst
dexon-solidity-38cc0b8dd30c003a91918e078493352b2a52998f.zip
Adjusting SolidityCompiler tests
- Adjusting SolidityCompiler tests to take into account the size of the new Function Selector
Diffstat (limited to 'SolidityCompiler.cpp')
-rw-r--r--SolidityCompiler.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/SolidityCompiler.cpp b/SolidityCompiler.cpp
index 385a3e57..ea09678d 100644
--- a/SolidityCompiler.cpp
+++ b/SolidityCompiler.cpp
@@ -96,7 +96,7 @@ BOOST_AUTO_TEST_CASE(smoke_test)
"}\n";
bytes code = compileContract(sourceCode);
- unsigned boilerplateSize = 40;
+ unsigned boilerplateSize = 72;
bytes expectation({byte(Instruction::JUMPDEST),
byte(Instruction::PUSH1), 0x0, // initialize local variable x
byte(Instruction::PUSH1), 0x2,
@@ -115,9 +115,8 @@ BOOST_AUTO_TEST_CASE(different_argument_numbers)
" function g() returns (uint e, uint h) { h = f(1, 2, 3); }\n"
"}\n";
bytes code = compileContract(sourceCode);
-
- unsigned shift = 68;
- unsigned boilerplateSize = 81;
+ unsigned shift = 102;
+ unsigned boilerplateSize = 115;
bytes expectation({byte(Instruction::JUMPDEST),
byte(Instruction::PUSH1), 0x0, // initialize return variable d
byte(Instruction::DUP3),
@@ -166,9 +165,8 @@ BOOST_AUTO_TEST_CASE(ifStatement)
" function f() { bool x; if (x) 77; else if (!x) 78; else 79; }"
"}\n";
bytes code = compileContract(sourceCode);
-
- unsigned shift = 27;
- unsigned boilerplateSize = 40;
+ unsigned shift = 59;
+ unsigned boilerplateSize = 72;
bytes expectation({byte(Instruction::JUMPDEST),
byte(Instruction::PUSH1), 0x0,
byte(Instruction::DUP1),
@@ -208,9 +206,8 @@ BOOST_AUTO_TEST_CASE(loops)
" function f() { while(true){1;break;2;continue;3;return;4;} }"
"}\n";
bytes code = compileContract(sourceCode);
-
- unsigned shift = 27;
- unsigned boilerplateSize = 40;
+ unsigned shift = 59;
+ unsigned boilerplateSize = 72;
bytes expectation({byte(Instruction::JUMPDEST),
byte(Instruction::JUMPDEST),
byte(Instruction::PUSH1), 0x1,