diff options
author | chriseth <c@ethdev.com> | 2015-10-06 20:13:07 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-10-06 20:20:06 +0800 |
commit | 99351aebe0c9ebbb06e34c18ecc19bc0c87d9d54 (patch) | |
tree | fd0c7d5797454be93d4c767142ed6042ebf4d00f /test/libsolidity/SolidityEndToEndTest.cpp | |
parent | 44e42bf52e481f4f653a669291812b4d31f06022 (diff) | |
download | dexon-solidity-99351aebe0c9ebbb06e34c18ecc19bc0c87d9d54.tar.gz dexon-solidity-99351aebe0c9ebbb06e34c18ecc19bc0c87d9d54.tar.zst dexon-solidity-99351aebe0c9ebbb06e34c18ecc19bc0c87d9d54.zip |
Compiler version stamp.
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index b46b405d..3cfe4975 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -5539,6 +5539,17 @@ BOOST_AUTO_TEST_CASE(calldata_offset) BOOST_CHECK(callContractFunction("last()", encodeArgs()) == encodeDyn(string("nd"))); } +BOOST_AUTO_TEST_CASE(version_stamp_for_libraries) +{ + char const* sourceCode = "library lib {}"; + m_optimize = true; + bytes runtimeCode = compileAndRun(sourceCode, 0, "lib"); + BOOST_CHECK(runtimeCode.size() >= 8); + BOOST_CHECK_EQUAL(runtimeCode[0], int(eth::Instruction::PUSH6)); // might change once we switch to 1.x.x + BOOST_CHECK_EQUAL(runtimeCode[1], 1); // might change once we switch away from x.1.x + BOOST_CHECK_EQUAL(runtimeCode[7], int(eth::Instruction::POP)); +} + BOOST_AUTO_TEST_SUITE_END() } |