| 984 | } |
| 985 | |
| 986 | void SearchCachedDFA(benchmark::State& state, const char* regexp, |
| 987 | const StringPiece& text, Prog::Anchor anchor, |
| 988 | bool expect_match) { |
| 989 | Prog* prog = GetCachedProg(regexp); |
| 990 | for (auto _ : state) { |
| 991 | bool failed = false; |
| 992 | CHECK_EQ(prog->SearchDFA(text, StringPiece(), anchor, Prog::kFirstMatch, |
| 993 | NULL, &failed, NULL), |
| 994 | expect_match); |
| 995 | CHECK(!failed); |
| 996 | } |
| 997 | } |
| 998 | |
| 999 | void SearchCachedNFA(benchmark::State& state, const char* regexp, |
| 1000 | const StringPiece& text, Prog::Anchor anchor, |
nothing calls this directly
no test coverage detected