]> git.draconx.ca Git - cdecl99.git/blobdiff - tests/internal.at
libcdecl: Fix scanning of hexadecimal constants.
[cdecl99.git] / tests / internal.at
index 3fa785a6055f1e8210ed6ee672d37b5d8f49ce60..ee87919076a85f28398c396680f1f90226cb0749 100644 (file)
@@ -113,3 +113,37 @@ AT_CHECK([rendertest --english -n 15 <input], [0],
 ]])
 
 AT_CLEANUP
+
+AT_SETUP([cdecl__yylex integer constants])
+
+AT_CHECK([scantest \
+  '0 000 0x00 0X00' \
+  '1234 01234 0x1234 0X1234' \
+  '4294967295 037777777777 0xffffffff 0XFFFFFFFF' \
+  09 012345678 0x 0X], [0],
+[[integer constant 0
+integer constant 0
+integer constant 0
+integer constant 0
+eof
+integer constant 1234
+integer constant 668
+integer constant 4660
+integer constant 4660
+eof
+integer constant 4294967295
+integer constant 4294967295
+integer constant 4294967295
+integer constant 4294967295
+eof
+T_LEX_ERROR
+eof
+T_LEX_ERROR
+eof
+T_LEX_ERROR
+eof
+T_LEX_ERROR
+eof
+]])
+
+AT_CLEANUP