diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-01-28 05:24:58 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-01-28 05:24:58 +0800 |
commit | eb530aa217387092a84057b550c7665a4acf72b6 (patch) | |
tree | 5ce364bcff797079e9d27a265066ce11e3978f65 /test/libsolidity/SolidityEndToEndTest.cpp | |
parent | bfa3b4ca78fd1afe0756631ce0d1ccb9a6d9c467 (diff) | |
download | dexon-solidity-eb530aa217387092a84057b550c7665a4acf72b6.tar.gz dexon-solidity-eb530aa217387092a84057b550c7665a4acf72b6.tar.zst dexon-solidity-eb530aa217387092a84057b550c7665a4acf72b6.zip |
Add tests for invalid instruction
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 646017fb..4075a016 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -9043,6 +9043,21 @@ BOOST_AUTO_TEST_CASE(recursive_structs) BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(1))); } +BOOST_AUTO_TEST_CASE(invalid_instruction) +{ + char const* sourceCode = R"( + contract C { + function f() { + assembly { + invalid + } + } + } + )"; + compileAndRun(sourceCode, 0, "C"); + BOOST_CHECK(callContractFunction("f()") == encodeArgs()); +} + BOOST_AUTO_TEST_SUITE_END() } |