From 845bcf8db09c536c157a7575981daa42b6e6e938 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 10 Sep 2015 14:26:34 +0200 Subject: - added tests to test empty comment - fixed skipSingleLineComment - some style fixes --- test/libsolidity/SolidityScanner.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/libsolidity/SolidityScanner.cpp') 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() } -- cgit