diff --git a/test/token/TokenFactoryTester.java b/test/token/TokenFactoryTester.java index 15ea8f7..eeb61a6 100644 --- a/test/token/TokenFactoryTester.java +++ b/test/token/TokenFactoryTester.java @@ -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\"";