1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-08 08:25:19 +00:00

Write tests for special cases.

This commit is contained in:
2017-07-30 00:46:42 -07:00
parent f28f56b5f0
commit 0f21526ec8

View File

@@ -28,4 +28,17 @@ public class LexerTests {
Assert.assertNull(lexer.lexAll("abcdefabcz", 0, Integer::compare));
}
@Test
public void testNoPatterns(){
Lexer<Integer> lexer = new Lexer<>();
Assert.assertNull(lexer.lexAll("abcdefabc", 0, Integer::compare));
}
@Test
public void testEmptyMatches(){
Lexer<Integer> lexer = new Lexer<>();
lexer.register("a?", 0);
Assert.assertNull(lexer.lexAll("", 0, Integer::compare));
}
}