mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 18:30:42 +00:00
Add test for #2
This commit is contained in:
parent
f3f3bbb77d
commit
660fe2b5d1
@ -229,8 +229,21 @@ class LambdaParserTest {
|
||||
assertEquals(ExpectedInput.TERM, error.getExpectedInput().get());
|
||||
}
|
||||
|
||||
@Test
|
||||
void errorCase3() {
|
||||
ParseError err = getParseError("let k = λx.λy.x in .k k w");
|
||||
assertEquals(TokenType.DOT, err.getCause().get().getType());
|
||||
assertEquals(19, err.getCause().get().getPos());
|
||||
assertEquals(ExpectedInput.TERM, err.getExpectedInput().get());
|
||||
}
|
||||
|
||||
@Test
|
||||
void equality() {
|
||||
EqualsVerifier.forClass(Token.class).usingGetClass().verify();
|
||||
}
|
||||
|
||||
static ParseError getParseError(String term) {
|
||||
LambdaParser parser = new LambdaParser(term);
|
||||
return parser.parse().unwrapError();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user