(t *testing.T)
| 308 | } |
| 309 | |
| 310 | func TestStdlibCompat_FindString(t *testing.T) { |
| 311 | for _, test := range findTests { |
| 312 | t.Run(test.String(), func(t *testing.T) { |
| 313 | stdRe := regexp.MustCompile(test.pat) |
| 314 | cgRe := MustCompile(test.pat) |
| 315 | |
| 316 | stdResult := stdRe.FindString(test.text) |
| 317 | cgResult := cgRe.FindString(test.text) |
| 318 | |
| 319 | if stdResult != cgResult { |
| 320 | t.Errorf("FindString(%q, %q):\n stdlib: %q\n coregex: %q", |
| 321 | test.pat, test.text, stdResult, cgResult) |
| 322 | } |
| 323 | }) |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | func TestStdlibCompat_FindIndex(t *testing.T) { |
| 328 | for _, test := range findTests { |
nothing calls this directly
no test coverage detected