update at 2023-03-06 20:05:59 by ehlxr

master
ehlxr 2023-03-06 20:05:59 +08:00
parent 17258f4c05
commit 5427d381f0
1 changed files with 3 additions and 3 deletions

View File

@ -7,21 +7,21 @@ import (
func TestBf(t *testing.T) {
s := "bacbababaabcbab"
p := "ababa"
p := "abababca"
fmt.Printf("bf %s match %s index is: %+v\n", p, s, bf(s, p))
// t.Logf("%s match %s index is: %+v\n", p, s, bf(s, p))
}
func TestGetNext(t *testing.T) {
p := "ababa"
p := "abababca"
fmt.Printf("getNext %s next is: %+v\n", p, getNext(p))
// t.Logf("%s next is: %+v\n", p, next)
}
func TestKmp(t *testing.T) {
s := "bacbababaabcbab"
p := "ababa"
p := "abababca"
fmt.Printf("kmp %s match %s index is: %+v\n", p, s, kmp(s, p))
// t.Logf("%s match %s index is: %+v\n", p, s, kmp(s, p))