chore: add more tests (#2866)
* chore: add more tests * chore: add more tests * chore: fix test failure
This commit is contained in:
@@ -6,6 +6,15 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestLongestMatchGuardedCondition(t *testing.T) {
|
||||
n := new(node)
|
||||
n.end = true
|
||||
used, jump, matched := n.longestMatch([]rune(""), 0)
|
||||
assert.Equal(t, 0, used)
|
||||
assert.Nil(t, jump)
|
||||
assert.True(t, matched)
|
||||
}
|
||||
|
||||
func TestFuzzNodeCase1(t *testing.T) {
|
||||
keywords := []string{
|
||||
"cs8Zh",
|
||||
|
||||
Reference in New Issue
Block a user