(t *testing.T)
| 342 | } |
| 343 | |
| 344 | func TestStdlibCompat_FindStringIndex(t *testing.T) { |
| 345 | for _, test := range findTests { |
| 346 | t.Run(test.String(), func(t *testing.T) { |
| 347 | stdRe := regexp.MustCompile(test.pat) |
| 348 | cgRe := MustCompile(test.pat) |
| 349 | |
| 350 | stdResult := stdRe.FindStringIndex(test.text) |
| 351 | cgResult := cgRe.FindStringIndex(test.text) |
| 352 | |
| 353 | if !reflect.DeepEqual(stdResult, cgResult) { |
| 354 | t.Errorf("FindStringIndex(%q, %q):\n stdlib: %v\n coregex: %v", |
| 355 | test.pat, test.text, stdResult, cgResult) |
| 356 | } |
| 357 | }) |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | // =========================================================================== |
| 362 | // FindAll Tests - Compare coregex vs stdlib |
nothing calls this directly
no test coverage detected