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

Function TestIsInterleave

dynamic/interleavingstrings_test.go:29–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27}
28
29func TestIsInterleave(t *testing.T) {
30 t.Run("Interleaving Strings test cases", func(t *testing.T) {
31 for _, tc := range getInterleavingTestCases() {
32 actual := dynamic.IsInterleave(tc.s1, tc.s2, tc.s3)
33 if actual != tc.expected {
34 t.Errorf("IsInterleave(%q, %q, %q) = %v; expected %v", tc.s1, tc.s2, tc.s3, actual, tc.expected)
35 }
36 }
37 })
38}

Callers

nothing calls this directly

Calls 2

IsInterleaveFunction · 0.92
getInterleavingTestCasesFunction · 0.85

Tested by

no test coverage detected