diff options
author | chriseth <c@ethdev.com> | 2017-02-16 21:54:17 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-02-16 21:57:00 +0800 |
commit | e629cf5bc3dc093a302b461273d89c8dd5999cb6 (patch) | |
tree | 2394205593e5a3462a89a9fede570464a64dd9c4 | |
parent | ad751bd3e6f22fadc01d43610ec2e2e008c32f11 (diff) | |
download | dexon-solidity-e629cf5bc3dc093a302b461273d89c8dd5999cb6.tar.gz dexon-solidity-e629cf5bc3dc093a302b461273d89c8dd5999cb6.tar.zst dexon-solidity-e629cf5bc3dc093a302b461273d89c8dd5999cb6.zip |
Test case.
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 1a4f3cdc..507d9057 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5079,6 +5079,22 @@ BOOST_AUTO_TEST_CASE(invalid_address_length) CHECK_WARNING(text, "checksum"); } +BOOST_AUTO_TEST_CASE(early_exit_on_fatal_errors) +{ + // This tests a crash that occured because we did not stop for fatal errors. + char const* text = R"( + contract C { + struct S { + ftring a; + } + S public s; + function s() s { + } + } + )"; + CHECK_ERROR(text, DeclarationError, "Identifier not found or not unique"); +} + BOOST_AUTO_TEST_SUITE_END() } |