Added a few extra unit tests for number prefixes
This commit is contained in:
parent
fb35884479
commit
2ef285e45c
|
@ -54,12 +54,24 @@ public class TokenFactoryTester {
|
||||||
assertTrue(createToken(text) instanceof Number);
|
assertTrue(createToken(text) instanceof Number);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testPrefixedNumberCreation() {
|
||||||
|
String text = "-987";
|
||||||
|
assertTrue(createToken(text) instanceof Number);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIdentifierCreation() {
|
public void testIdentifierCreation() {
|
||||||
String text = "identifier";
|
String text = "identifier";
|
||||||
assertTrue(createToken(text) instanceof Identifier);
|
assertTrue(createToken(text) instanceof Identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testPrefixedIdentifierCreation() {
|
||||||
|
String text = "-identifier";
|
||||||
|
assertTrue(createToken(text) instanceof Identifier);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testStringCreation() {
|
public void testStringCreation() {
|
||||||
String text = "\"string\"";
|
String text = "\"string\"";
|
||||||
|
|
Loading…
Reference in New Issue