MCPcopy Create free account
hub / github.com/Q1mi/go_tutorial / TestSplit

Function TestSplit

video28/split/split_test.go:21–41  ·  view source on GitHub ↗

测试 func TestSplit(t *testing.T){ got := Split("我爱你", "爱") want := []string{"我", "你"} //got := Split("a:b:c", ":") //want := []string{"a", "b", "c"} if !reflect.DeepEqual(got, want){ t.Errorf("want:%v got:%v", want, got) } }

(t *testing.T)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

SplitFunction · 0.85

Tested by

no test coverage detected