aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityScanner.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-09-10 20:26:34 +0800
committerLianaHus <liana@ethdev.com>2015-09-10 20:26:34 +0800
commit845bcf8db09c536c157a7575981daa42b6e6e938 (patch)
tree07557b43dc18366d3ce9be99c6d63737b4864437 /test/libsolidity/SolidityScanner.cpp
parent3fc2561223c989885e1473cb29394bb07a26492f (diff)
downloaddexon-solidity-845bcf8db09c536c157a7575981daa42b6e6e938.tar.gz
dexon-solidity-845bcf8db09c536c157a7575981daa42b6e6e938.tar.zst
dexon-solidity-845bcf8db09c536c157a7575981daa42b6e6e938.zip
- added tests to test empty comment
- fixed skipSingleLineComment - some style fixes
Diffstat (limited to 'test/libsolidity/SolidityScanner.cpp')
-rw-r--r--test/libsolidity/SolidityScanner.cpp10
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()
}