Add test for part of #9

This commit is contained in:
Arne Keller 2021-07-05 19:03:05 +02:00
parent c28576175a
commit 6c9aca3eb6

View File

@ -124,6 +124,7 @@ class LambdaParserTest {
error = parser.parse().unwrapError(); error = parser.parse().unwrapError();
assertEquals(ParseError.UNEXPECTED_TOKEN, error); assertEquals(ParseError.UNEXPECTED_TOKEN, error);
assertEquals(new Token(TokenType.DOT, ".", "λx..", 3), error.getCause().get()); assertEquals(new Token(TokenType.DOT, ".", "λx..", 3), error.getCause().get());
assertEquals(ExpectedInput.TERM, error.getExpectedInput().get());
parser = new LambdaParser("let ) ="); parser = new LambdaParser("let ) =");
error = parser.parse().unwrapError(); error = parser.parse().unwrapError();
assertEquals(ParseError.UNEXPECTED_TOKEN, error); assertEquals(ParseError.UNEXPECTED_TOKEN, error);