From 7e8ecb1806e228d3cd5d16a9e8986abb8e52ef0b Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Mon, 5 Jan 2015 16:37:43 +0100 Subject: Fix for sol scanner where empty multiline comment became Natspec comment --- SolidityScanner.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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("/***/")); -- cgit