diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-12-12 23:45:17 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-12-18 23:02:35 +0800 |
commit | c2ec6d71b4707dab9b7727347077904b7a90eaf2 (patch) | |
tree | e53763da22d68f1b97a5390f07c4d09c633baefa /test | |
parent | c60ec958abea4f63eea8783d67a5054ca04d0a64 (diff) | |
download | dexon-solidity-c2ec6d71b4707dab9b7727347077904b7a90eaf2.tar.gz dexon-solidity-c2ec6d71b4707dab9b7727347077904b7a90eaf2.tar.zst dexon-solidity-c2ec6d71b4707dab9b7727347077904b7a90eaf2.zip |
Add version pragma parsing to Parser
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityParser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index d86d3d39..619d6a48 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -113,6 +113,15 @@ while(0) BOOST_AUTO_TEST_SUITE(SolidityParser) +BOOST_AUTO_TEST_CASE(unsatisfied_version_followed_by_invalid_syntax) +{ + char const* text = R"( + pragma solidity ^99.99.0; + this is surely invalid + )"; + CHECK_PARSE_ERROR(text, "Source file requires different compiler version"); +} + BOOST_AUTO_TEST_CASE(function_natspec_documentation) { char const* text = R"( |