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

Function TestStdlibCompat_FindAllIndex

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

Source from the content-addressed store, hash-verified

405}
406
407func TestStdlibCompat_FindAllIndex(t *testing.T) {
408 for _, test := range findTests {
409 t.Run(test.String(), func(t *testing.T) {
410 stdRe := regexp.MustCompile(test.pat)
411 cgRe := MustCompile(test.pat)
412
413 stdResult := stdRe.FindAllStringIndex(test.text, -1)
414 cgResult := cgRe.FindAllStringIndex(test.text, -1)
415
416 if !reflect.DeepEqual(stdResult, cgResult) {
417 t.Errorf("FindAllStringIndex(%q, %q):\n stdlib: %v\n coregex: %v",
418 test.pat, test.text, stdResult, cgResult)
419 }
420 })
421 }
422}
423
424func TestStdlibCompat_FindAllStringIndex(t *testing.T) {
425 for _, test := range findTests {

Callers

nothing calls this directly

Calls 3

MustCompileFunction · 0.85
FindAllStringIndexMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected