=========================================================================== Match Tests - Compare coregex vs stdlib ===========================================================================
(t *testing.T)
| 269 | // =========================================================================== |
| 270 | |
| 271 | func TestStdlibCompat_Match(t *testing.T) { |
| 272 | for _, test := range findTests { |
| 273 | t.Run(test.String(), func(t *testing.T) { |
| 274 | stdRe := regexp.MustCompile(test.pat) |
| 275 | cgRe := MustCompile(test.pat) |
| 276 | |
| 277 | // Test MatchString |
| 278 | stdMatchStr := stdRe.MatchString(test.text) |
| 279 | cgMatchStr := cgRe.MatchString(test.text) |
| 280 | |
| 281 | if stdMatchStr != cgMatchStr { |
| 282 | t.Errorf("MatchString(%q, %q):\n stdlib: %v\n coregex: %v", |
| 283 | test.pat, test.text, stdMatchStr, cgMatchStr) |
| 284 | } |
| 285 | }) |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | // =========================================================================== |
| 290 | // Find Tests - Compare coregex vs stdlib |
nothing calls this directly
no test coverage detected