Disable broken tests that are not useful.

This commit is contained in:
chriseth 2016-11-11 18:43:34 +01:00
parent cb000a5532
commit a8e7ed37a1
2 changed files with 2 additions and 45 deletions

View File

@ -325,12 +325,12 @@ BOOST_AUTO_TEST_CASE(arithmetics)
byte(Instruction::ADD),
byte(Instruction::DUP2),
byte(Instruction::ISZERO),
byte(Instruction::PUSH1), 0x2,
byte(Instruction::PUSH1), 0x0,
byte(Instruction::JUMPI),
byte(Instruction::MOD),
byte(Instruction::DUP2),
byte(Instruction::ISZERO),
byte(Instruction::PUSH1), 0x2,
byte(Instruction::PUSH1), 0x0,
byte(Instruction::JUMPI),
byte(Instruction::DIV),
byte(Instruction::MUL)});
@ -425,39 +425,6 @@ BOOST_AUTO_TEST_CASE(assignment)
BOOST_CHECK_EQUAL_COLLECTIONS(code.begin(), code.end(), expectation.begin(), expectation.end());
}
BOOST_AUTO_TEST_CASE(function_call)
{
char const* sourceCode = "contract test {\n"
" function f(uint a, uint b) { a += g(a + 1, b) * 2; }\n"
" function g(uint a, uint b) returns (uint c) {}\n"
"}\n";
bytes code = compileFirstExpression(sourceCode, {{"test", "g"}},
{{"test", "f", "a"}, {"test", "f", "b"}});
// Stack: a, b
bytes expectation({byte(Instruction::PUSH1), 0x02,
byte(Instruction::PUSH1), 0x0c,
byte(Instruction::PUSH1), 0x01,
byte(Instruction::DUP5),
byte(Instruction::ADD),
// Stack here: a b 2 <ret label> (a+1)
byte(Instruction::DUP4),
byte(Instruction::PUSH1), 0x13,
byte(Instruction::JUMP),
byte(Instruction::JUMPDEST),
// Stack here: a b 2 g(a+1, b)
byte(Instruction::MUL),
// Stack here: a b g(a+1, b)*2
byte(Instruction::DUP3),
byte(Instruction::ADD),
// Stack here: a b a+g(a+1, b)*2
byte(Instruction::SWAP2),
byte(Instruction::POP),
byte(Instruction::DUP2),
byte(Instruction::JUMPDEST)});
BOOST_CHECK_EQUAL_COLLECTIONS(code.begin(), code.end(), expectation.begin(), expectation.end());
}
BOOST_AUTO_TEST_CASE(negative_literals_8bits)
{
char const* sourceCode = "contract test {\n"

View File

@ -365,16 +365,6 @@ BOOST_AUTO_TEST_CASE(store_tags_as_unions)
// BOOST_CHECK_EQUAL(2, numSHA3s);
}
BOOST_AUTO_TEST_CASE(successor_not_found_bug)
{
// This bug was caused because MSVC chose to use the u256->bool conversion
// instead of u256->unsigned
char const* sourceCode = R"(
contract greeter { function greeter() { uint x = 2; x ++; } }
)";
compileBothVersions(sourceCode);
}
BOOST_AUTO_TEST_CASE(incorrect_storage_access_bug)
{
// This bug appeared because a sha3 operation with too low sequence number was used,