(t *testing.T)
| 468 | } |
| 469 | |
| 470 | func TestStdlibCompat_FindStringSubmatch(t *testing.T) { |
| 471 | for _, test := range findTests { |
| 472 | t.Run(test.String(), func(t *testing.T) { |
| 473 | stdRe := regexp.MustCompile(test.pat) |
| 474 | cgRe := MustCompile(test.pat) |
| 475 | |
| 476 | stdResult := stdRe.FindStringSubmatch(test.text) |
| 477 | cgResult := cgRe.FindStringSubmatch(test.text) |
| 478 | |
| 479 | if !reflect.DeepEqual(stdResult, cgResult) { |
| 480 | t.Errorf("FindStringSubmatch(%q, %q):\n stdlib: %v\n coregex: %v", |
| 481 | test.pat, test.text, stdResult, cgResult) |
| 482 | } |
| 483 | }) |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | func TestStdlibCompat_FindSubmatchIndex(t *testing.T) { |
| 488 | for _, test := range findTests { |
nothing calls this directly
no test coverage detected