diff options
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/InlineAssembly.cpp | 10 | ||||
-rw-r--r-- | test/libsolidity/StandardCompiler.cpp | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp index 7876b7ee..aae6dacd 100644 --- a/test/libsolidity/InlineAssembly.cpp +++ b/test/libsolidity/InlineAssembly.cpp @@ -572,6 +572,16 @@ BOOST_AUTO_TEST_CASE(returndatacopy_functional) BOOST_CHECK(successAssemble("{ returndatacopy(0, 32, 64) }")); } +BOOST_AUTO_TEST_CASE(staticcall) +{ + BOOST_CHECK(successAssemble("{ pop(staticcall(10000, 0x123, 64, 0x10, 128, 0x10)) }")); +} + +BOOST_AUTO_TEST_CASE(create2) +{ + BOOST_CHECK(successAssemble("{ pop(create2(10, 0x123, 32, 64)) }")); +} + BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() diff --git a/test/libsolidity/StandardCompiler.cpp b/test/libsolidity/StandardCompiler.cpp index 92bb471b..35644a4d 100644 --- a/test/libsolidity/StandardCompiler.cpp +++ b/test/libsolidity/StandardCompiler.cpp @@ -201,11 +201,12 @@ BOOST_AUTO_TEST_CASE(basic_compilation) BOOST_CHECK(dev::test::bytecodeSansMetadata(contract["evm"]["bytecode"]["object"].asString()) == "60606040523415600b57fe5b5b60338060196000396000f30060606040525bfe00"); BOOST_CHECK(contract["evm"]["assembly"].isString()); - BOOST_CHECK(contract["evm"]["assembly"].asString() == + BOOST_CHECK(contract["evm"]["assembly"].asString().find( " /* \"fileA\":0:14 contract A { } */\n mstore(0x40, 0x60)\n jumpi(tag_1, iszero(callvalue))\n" " invalid\ntag_1:\ntag_2:\n dataSize(sub_0)\n dup1\n dataOffset(sub_0)\n 0x0\n codecopy\n 0x0\n" " return\nstop\n\nsub_0: assembly {\n /* \"fileA\":0:14 contract A { } */\n" - " mstore(0x40, 0x60)\n tag_1:\n invalid\n}\n"); + " mstore(0x40, 0x60)\n tag_1:\n invalid\n\n" + " auxdata: 0xa165627a7a72305820") != std::string::npos); BOOST_CHECK(contract["evm"]["gasEstimates"].isObject()); BOOST_CHECK(dev::jsonCompactPrint(contract["evm"]["gasEstimates"]) == "{\"creation\":{\"codeDepositCost\":\"10200\",\"executionCost\":\"62\",\"totalCost\":\"10262\"}}"); |