1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-12-22 07:20:09 -08:00

Write tests for special cases.

This commit is contained in:
Danila Fedorin 2017-07-30 00:46:42 -07:00
parent 317cc552e6
commit 28004ed98d

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));
}
}