(re, expectMatch, expectNoMatch = [])
| 5 | // Test peephole optimization patterns not covered by other tests. |
| 6 | |
| 7 | function test(re, expectMatch, expectNoMatch = []) { |
| 8 | for (const match of expectMatch) { |
| 9 | assertTrue(re.test(match), `${re}.test(${match})`); |
| 10 | } |
| 11 | for (const noMatch of expectNoMatch) { |
| 12 | assertFalse(re.test(noMatch), `${re}.test(${noMatch})`); |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | // Test SkipUntilMatchInAlternativeWithFewChars |
| 17 | test( |
no test coverage detected
searching dependent graphs…