MCPcopy Create free account
hub / github.com/coregx/coregex / TestStdlibCompat_Split

Function TestStdlibCompat_Split

stdlib_compat_test.go:879–894  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

877}
878
879func TestStdlibCompat_Split(t *testing.T) {
880 for _, tc := range splitTests {
881 t.Run(tc.r+"_"+tc.s, func(t *testing.T) {
882 stdRe := regexp.MustCompile(tc.r)
883 cgRe := MustCompile(tc.r)
884
885 stdResult := stdRe.Split(tc.s, tc.n)
886 cgResult := cgRe.Split(tc.s, tc.n)
887
888 if !reflect.DeepEqual(stdResult, cgResult) {
889 t.Errorf("Split(%q, %q, %d):\n stdlib: %v\n coregex: %v",
890 tc.s, tc.r, tc.n, stdResult, cgResult)
891 }
892 })
893 }
894}
895
896// ===========================================================================
897// QuoteMeta Tests - Compare coregex vs stdlib

Callers

nothing calls this directly

Calls 2

MustCompileFunction · 0.85
SplitMethod · 0.45

Tested by

no test coverage detected