mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Empty storage option for isoltest.
This commit is contained in:
@@ -953,6 +953,28 @@ BOOST_AUTO_TEST_CASE(library)
|
||||
);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(empty_storage)
|
||||
{
|
||||
char const* source = R"(
|
||||
// storage: empty
|
||||
)";
|
||||
auto const calls = parse(source);
|
||||
BOOST_REQUIRE_EQUAL(calls.size(), 1);
|
||||
BOOST_CHECK(calls.at(0).kind == FunctionCall::Kind::Storage);
|
||||
BOOST_CHECK(calls.at(0).expectations.result.front().rawBytes == bytes(1, 0));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(nonempty_storage)
|
||||
{
|
||||
char const* source = R"(
|
||||
// storage: nonempty
|
||||
)";
|
||||
auto const calls = parse(source);
|
||||
BOOST_REQUIRE_EQUAL(calls.size(), 1);
|
||||
BOOST_CHECK(calls.at(0).kind == FunctionCall::Kind::Storage);
|
||||
BOOST_CHECK(calls.at(0).expectations.result.front().rawBytes == bytes(1, 1));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user