| 864 | } |
| 865 | |
| 866 | void SearchNFA(benchmark::State& state, const char* regexp, |
| 867 | const StringPiece& text, Prog::Anchor anchor, |
| 868 | bool expect_match) { |
| 869 | for (auto _ : state) { |
| 870 | Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL); |
| 871 | CHECK(re); |
| 872 | Prog* prog = re->CompileToProg(0); |
| 873 | CHECK(prog); |
| 874 | CHECK_EQ(prog->SearchNFA(text, StringPiece(), anchor, Prog::kFirstMatch, |
| 875 | NULL, 0), |
| 876 | expect_match); |
| 877 | delete prog; |
| 878 | re->Decref(); |
| 879 | } |
| 880 | } |
| 881 | |
| 882 | void SearchOnePass(benchmark::State& state, const char* regexp, |
| 883 | const StringPiece& text, Prog::Anchor anchor, |
nothing calls this directly
no test coverage detected