MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / TestBooyerMoore

Function TestBooyerMoore

strings/search/patternsearch_test.go:63–72  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func TestBooyerMoore(t *testing.T) {
64 for _, tc := range testCases {
65 t.Run(tc.name, func(t *testing.T) {
66 actual := BoyerMoore(tc.input, tc.pattern)
67 if !reflect.DeepEqual(actual, tc.expected) {
68 t.Errorf("Expected matches for pattern '%s' for string '%s' are: %v, but actual matches are: %v", tc.pattern, tc.input, tc.expected, actual)
69 }
70 })
71 }
72}

Callers

nothing calls this directly

Calls 1

BoyerMooreFunction · 0.85

Tested by

no test coverage detected