(t *testing.T)
| 502 | } |
| 503 | |
| 504 | func TestStdlibCompat_FindStringSubmatchIndex(t *testing.T) { |
| 505 | for _, test := range findTests { |
| 506 | t.Run(test.String(), func(t *testing.T) { |
| 507 | stdRe := regexp.MustCompile(test.pat) |
| 508 | cgRe := MustCompile(test.pat) |
| 509 | |
| 510 | stdResult := stdRe.FindStringSubmatchIndex(test.text) |
| 511 | cgResult := cgRe.FindStringSubmatchIndex(test.text) |
| 512 | |
| 513 | if !reflect.DeepEqual(stdResult, cgResult) { |
| 514 | t.Errorf("FindStringSubmatchIndex(%q, %q):\n stdlib: %v\n coregex: %v", |
| 515 | test.pat, test.text, stdResult, cgResult) |
| 516 | } |
| 517 | }) |
| 518 | } |
| 519 | } |
| 520 | |
| 521 | // =========================================================================== |
| 522 | // FindAllSubmatch Tests - Compare coregex vs stdlib |
nothing calls this directly
no test coverage detected