Skip to content

Commit 3bd7bc1

Browse files
unit test for invalid suffix
1 parent 7f311a2 commit 3bd7bc1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/lang/c/test_lexer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ def test_lexical_error(self):
199199
self.tokenize(src)
200200
self.assertEqual("Expected '", cm.exception.msg)
201201

202+
def test_invalid_suffix(self):
203+
with self.assertRaises(CompilerError) as cm:
204+
self.tokenize("0xe+1")
205+
202206
def test_float_constant(self):
203207
""" Test floating point constant
204208

0 commit comments

Comments
 (0)