(t *testing.T)
| 422 | } |
| 423 | |
| 424 | func TestStdlibCompat_FindAllStringIndex(t *testing.T) { |
| 425 | for _, test := range findTests { |
| 426 | t.Run(test.String(), func(t *testing.T) { |
| 427 | stdRe := regexp.MustCompile(test.pat) |
| 428 | cgRe := MustCompile(test.pat) |
| 429 | |
| 430 | stdResult := stdRe.FindAllStringIndex(test.text, -1) |
| 431 | cgResult := cgRe.FindAllStringIndex(test.text, -1) |
| 432 | |
| 433 | if !reflect.DeepEqual(stdResult, cgResult) { |
| 434 | t.Errorf("FindAllStringIndex(%q, %q):\n stdlib: %v\n coregex: %v", |
| 435 | test.pat, test.text, stdResult, cgResult) |
| 436 | } |
| 437 | }) |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | // =========================================================================== |
| 442 | // Submatch Tests - Compare coregex vs stdlib |
nothing calls this directly
no test coverage detected