diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-05 23:37:43 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-05 23:37:43 +0800 |
commit | 7e8ecb1806e228d3cd5d16a9e8986abb8e52ef0b (patch) | |
tree | a5d1f2a7b3b82f25499ed150c0d64f9a78d743a0 | |
parent | a0ecb5d4e876aeff12a58e45563f0ea39f1bdf87 (diff) | |
download | dexon-solidity-7e8ecb1806e228d3cd5d16a9e8986abb8e52ef0b.tar.gz dexon-solidity-7e8ecb1806e228d3cd5d16a9e8986abb8e52ef0b.tar.zst dexon-solidity-7e8ecb1806e228d3cd5d16a9e8986abb8e52ef0b.zip |
Fix for sol scanner where empty multiline comment became Natspec comment
-rw-r--r-- | SolidityScanner.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/SolidityScanner.cpp b/SolidityScanner.cpp index 355ea9e2..b7942d29 100644 --- a/SolidityScanner.cpp +++ b/SolidityScanner.cpp @@ -227,6 +227,13 @@ BOOST_AUTO_TEST_CASE(documentation_comment_before_eos) BOOST_CHECK_EQUAL(scanner.getCurrentCommentLiteral(), ""); } +BOOST_AUTO_TEST_CASE(empty_multiline_comment) +{ + Scanner scanner(CharStream("/**/")); + BOOST_CHECK_EQUAL(scanner.getCurrentToken(), Token::EOS); + BOOST_CHECK_EQUAL(scanner.getCurrentCommentLiteral(), ""); +} + BOOST_AUTO_TEST_CASE(empty_multiline_documentation_comment_before_eos) { Scanner scanner(CharStream("/***/")); |