diff options
Diffstat (limited to 'test/libsolidity/SolidityScanner.cpp')
-rw-r--r-- | test/libsolidity/SolidityScanner.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityScanner.cpp b/test/libsolidity/SolidityScanner.cpp index 431f233e..dadcd903 100644 --- a/test/libsolidity/SolidityScanner.cpp +++ b/test/libsolidity/SolidityScanner.cpp @@ -281,6 +281,16 @@ BOOST_AUTO_TEST_CASE(time_after) BOOST_CHECK_EQUAL(scanner.currentToken(), Token::After); } +BOOST_AUTO_TEST_CASE(empty_comment) +{ + Scanner scanner(CharStream("//\ncontract{}")); + BOOST_CHECK_EQUAL(scanner.currentCommentLiteral(), ""); + BOOST_CHECK_EQUAL(scanner.currentToken(), Token::Contract); + BOOST_CHECK_EQUAL(scanner.next(), Token::LBrace); + BOOST_CHECK_EQUAL(scanner.next(), Token::RBrace); + +} + BOOST_AUTO_TEST_SUITE_END() } |