mirror of
https://github.com/Noratrieb/GRSBPL.git
synced 2026-01-14 11:45:02 +01:00
test numbers
This commit is contained in:
parent
44b41c3226
commit
c9aca7507f
1 changed files with 9 additions and 1 deletions
|
|
@ -104,6 +104,14 @@ class LexerTest {
|
|||
assertEquals(expected, getValues(lex(program)));
|
||||
}
|
||||
|
||||
@Test
|
||||
void alternativeNumbers() {
|
||||
String withHex = "0xFFF 0xa4 0x10 1_000";
|
||||
List<Integer> expected = List.of(0xFFF, 0xA4, 0x10, 1000);
|
||||
assertEquals(expected, getValues(lex(withHex)));
|
||||
}
|
||||
|
||||
|
||||
List<Token> lex(String program) {
|
||||
return lexer.lex(program.toCharArray());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue