added test

Conflicts:
	test/libsolidity/SolidityEndToEndTest.cpp
This commit is contained in:
LianaHus 2015-09-10 15:05:10 +02:00
parent 3fc2561223
commit 30e89b3d9a

View File

@ -5230,6 +5230,17 @@ BOOST_AUTO_TEST_CASE(storage_string_as_mapping_key_without_variable)
BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(2)));
}
BOOST_AUTO_TEST_CASE(string_as_mapping_key)
{
char const* sourceCode = R"(
contract Test {
function f() { var x = new Test(); }
}
)";
compileAndRun(sourceCode, 0, "Test");
}
BOOST_AUTO_TEST_SUITE_END()
}