Added a few extra unit tests for number prefixes

This commit is contained in:
Mike Cifelli 2017-02-27 13:37:56 -05:00
parent fb35884479
commit 2ef285e45c
1 changed files with 12 additions and 0 deletions

View File

@ -54,12 +54,24 @@ public class TokenFactoryTester {
assertTrue(createToken(text) instanceof Number);
}
@Test
public void testPrefixedNumberCreation() {
String text = "-987";
assertTrue(createToken(text) instanceof Number);
}
@Test
public void testIdentifierCreation() {
String text = "identifier";
assertTrue(createToken(text) instanceof Identifier);
}
@Test
public void testPrefixedIdentifierCreation() {
String text = "-identifier";
assertTrue(createToken(text) instanceof Identifier);
}
@Test
public void testStringCreation() {
String text = "\"string\"";