test suite test singleton pattern
test case test match()
assert the pattern("x")
assert !the pattern("y")
assert !the pattern("xx")
test case test viable prefix()
assert the pattern • is viable prefix("")
assert the pattern • is viable prefix("x")
assert !the pattern • is viable prefix("y")
assert !the pattern • is viable prefix("xx")
test case test match prefix()
assert the pattern • match prefix("x") == 1
assert the pattern • match prefix("xx") == 1
test case test find first()
test case test find last()
assert match is_not null
assert match • begin == 0
assert match • end == 1
assert match2 is_not null
assert match2 • begin == 5
assert match2 • end == 6
assert match3 is_not null
assert match3 • begin == 0
assert match3 • end == 1
assert match4 is_not null
assert match4 • begin == 5
assert match4 • end == 6
test case test split()
assert split0 • size == 1
assert equals(split0[0], "foo")
assert split1 • size == 3
assert equals(split1[0], "foo")
assert equals(split1[1], "bar")
assert equals(split1[2], "")
assert split2 • size == 4
assert equals(split2[0], "")
assert equals(split2[1], "1")
assert equals(split2[2], "2")
assert equals(split2[3], "3")