package replace import ( "testing" "internal/replace" ) func TestBoyerMooreReplace(t *testing.T) { var corpus string = "abcdefghi012345jklmnopqrst" var pairs = []string{"012345", "ABCDEF"} var want string = "abcdefghiABCDEFjklmnopqrst" got := replace.BoyerMooreReplace(corpus, pairs) if want != got { t.Error("Replacement was wrong.") } }