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

Function TestStdlibCompat_FindAllString

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

Source from the content-addressed store, hash-verified

388}
389
390func TestStdlibCompat_FindAllString(t *testing.T) {
391 for _, test := range findTests {
392 t.Run(test.String(), func(t *testing.T) {
393 stdRe := regexp.MustCompile(test.pat)
394 cgRe := MustCompile(test.pat)
395
396 stdResult := stdRe.FindAllString(test.text, -1)
397 cgResult := cgRe.FindAllString(test.text, -1)
398
399 if !reflect.DeepEqual(stdResult, cgResult) {
400 t.Errorf("FindAllString(%q, %q):\n stdlib: %v\n coregex: %v",
401 test.pat, test.text, stdResult, cgResult)
402 }
403 })
404 }
405}
406
407func TestStdlibCompat_FindAllIndex(t *testing.T) {
408 for _, test := range findTests {

Callers

nothing calls this directly

Calls 3

MustCompileFunction · 0.85
FindAllStringMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected