summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorShevek <[email protected]>2011-01-19 20:14:58 +0000
committerShevek <[email protected]>2011-01-19 20:14:58 +0000
commit3efdabfcc5c9b8253b1ecadcc987950abf6f1177 (patch)
treec7f5d68f492af447d0a2419c45c51f5d6580c87d /src/tests
parentaae974e849d5e4026f9d5a0b2ff37c6f604c94d9 (diff)
Fix some lexer bugs
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/org/anarres/cpp/LexerSourceTestCase.java16
1 files changed, 16 insertions, 0 deletions
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);
+
}
}