mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Test adjustments.
This commit is contained in:
parent
8a9da8648d
commit
bfb2ae9f3c
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
This file is part of cpp-ethereum.
|
||||
|
||||
@ -101,7 +100,7 @@ BOOST_AUTO_TEST_CASE(different_argument_numbers)
|
||||
"}\n";
|
||||
bytes code = compileContract(sourceCode);
|
||||
|
||||
unsigned shift = 76;
|
||||
unsigned shift = 75;
|
||||
unsigned boilerplateSize = 88;
|
||||
bytes expectation({byte(Instruction::JUMPDEST),
|
||||
byte(Instruction::PUSH1), 0x0, // initialize return variable d
|
||||
@ -154,7 +153,7 @@ BOOST_AUTO_TEST_CASE(ifStatement)
|
||||
"}\n";
|
||||
bytes code = compileContract(sourceCode);
|
||||
|
||||
unsigned shift = 39;
|
||||
unsigned shift = 38;
|
||||
unsigned boilerplateSize = 51;
|
||||
bytes expectation({byte(Instruction::JUMPDEST),
|
||||
byte(Instruction::PUSH1), 0x0,
|
||||
@ -196,7 +195,7 @@ BOOST_AUTO_TEST_CASE(loops)
|
||||
"}\n";
|
||||
bytes code = compileContract(sourceCode);
|
||||
|
||||
unsigned shift = 39;
|
||||
unsigned shift = 38;
|
||||
unsigned boilerplateSize = 51;
|
||||
bytes expectation({byte(Instruction::JUMPDEST),
|
||||
byte(Instruction::JUMPDEST),
|
||||
|
@ -177,7 +177,7 @@ BOOST_AUTO_TEST_CASE(short_circuiting)
|
||||
byte(eth::Instruction::GT),
|
||||
byte(eth::Instruction::ISZERO), // after this we have 10 + 8 >= 4
|
||||
byte(eth::Instruction::DUP1),
|
||||
byte(eth::Instruction::PUSH1), 0x15,
|
||||
byte(eth::Instruction::PUSH1), 0x14,
|
||||
byte(eth::Instruction::JUMPI), // short-circuit if it is true
|
||||
byte(eth::Instruction::POP),
|
||||
byte(eth::Instruction::PUSH1), 0x2,
|
||||
@ -320,13 +320,13 @@ BOOST_AUTO_TEST_CASE(function_call)
|
||||
{{"test", "f", "a"}, {"test", "f", "b"}});
|
||||
|
||||
// Stack: a, b
|
||||
bytes expectation({byte(eth::Instruction::PUSH1), 0x0b,
|
||||
bytes expectation({byte(eth::Instruction::PUSH1), 0x0a,
|
||||
byte(eth::Instruction::DUP3),
|
||||
byte(eth::Instruction::PUSH1), 0x01,
|
||||
byte(eth::Instruction::ADD),
|
||||
// Stack here: a b <ret label> (a+1)
|
||||
byte(eth::Instruction::DUP3),
|
||||
byte(eth::Instruction::PUSH1), 0x15,
|
||||
byte(eth::Instruction::PUSH1), 0x14,
|
||||
byte(eth::Instruction::JUMP),
|
||||
byte(eth::Instruction::JUMPDEST),
|
||||
// Stack here: a b g(a+1, b)
|
||||
|
Loading…
Reference in New Issue
Block a user