mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-23 07:50:09 -08:00
Write tests for special cases.
This commit is contained in:
parent
f28f56b5f0
commit
0f21526ec8
|
@ -28,4 +28,17 @@ public class LexerTests {
|
||||||
Assert.assertNull(lexer.lexAll("abcdefabcz", 0, Integer::compare));
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user