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

Function TestWordBreak

dynamic/wordbreak_test.go:31–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29}
30
31func TestWordBreak(t *testing.T) {
32 t.Run("Word Break test cases", func(t *testing.T) {
33 for _, tc := range getWordBreakTestCases() {
34 actual := dynamic.WordBreak(tc.s, tc.wordDict)
35 if actual != tc.expected {
36 t.Errorf("WordBreak(%q, %v) = %v; expected %v", tc.s, tc.wordDict, actual, tc.expected)
37 }
38 }
39 })
40}

Callers

nothing calls this directly

Calls 2

WordBreakFunction · 0.92
getWordBreakTestCasesFunction · 0.85

Tested by

no test coverage detected