Created
April 12, 2013 03:30
-
-
Save bryansills/5369114 to your computer and use it in GitHub Desktop.
plus test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void basicPlus() { | |
NFA left = new NFA(new HashSet<Character>(Arrays.asList(new Character[]{'a', 'b', 'c'}))); | |
NFA result = NFAOperations.plus(left); | |
assert(result.accepts("a")); | |
assert(result.accepts("aa")); | |
assert(result.accepts("ab")); | |
assert(result.accepts("ba")); | |
assert(result.accepts("bccc")); | |
assertFalse(result.accepts(null)); | |
assertFalse(result.accepts("x")); | |
assertFalse(result.accepts("ax")); | |
assertFalse(result.accepts("xc")); | |
assertFalse(result.accepts("cxa")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment