From 3efdabfcc5c9b8253b1ecadcc987950abf6f1177 Mon Sep 17 00:00:00 2001 From: Shevek Date: Wed, 19 Jan 2011 20:14:58 +0000 Subject: Fix some lexer bugs --- src/tests/org/anarres/cpp/LexerSourceTestCase.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/tests') diff --git a/src/tests/org/anarres/cpp/LexerSourceTestCase.java b/src/tests/org/anarres/cpp/LexerSourceTestCase.java index 7fa788c..828ee9c 100644 --- a/src/tests/org/anarres/cpp/LexerSourceTestCase.java +++ b/src/tests/org/anarres/cpp/LexerSourceTestCase.java @@ -60,6 +60,22 @@ public class LexerSourceTestCase extends BaseTestCase implements Test { XOR_EQ, WHITESPACE, IDENTIFIER); + testLexerSource("/**/", CCOMMENT); + testLexerSource("/** ** **/", CCOMMENT); + testLexerSource("//* ** **/", CPPCOMMENT); + testLexerSource("'\\r' '\\xf' '\\xff' 'x' 'aa' ''", + CHARACTER, WHITESPACE, + CHARACTER, WHITESPACE, + CHARACTER, WHITESPACE, + CHARACTER, WHITESPACE, + INVALID, WHITESPACE, + INVALID); + + testLexerSource("1i1I1l1L1ui1ul", + INTEGER, INTEGER, + INTEGER, INTEGER, + INTEGER, INTEGER); + } } -- cgit v1.2.3