| 880 | } |
| 881 | |
| 882 | void SearchOnePass(benchmark::State& state, const char* regexp, |
| 883 | const StringPiece& text, Prog::Anchor anchor, |
| 884 | bool expect_match) { |
| 885 | for (auto _ : state) { |
| 886 | Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL); |
| 887 | CHECK(re); |
| 888 | Prog* prog = re->CompileToProg(0); |
| 889 | CHECK(prog); |
| 890 | CHECK(prog->IsOnePass()); |
| 891 | CHECK_EQ(prog->SearchOnePass(text, text, anchor, Prog::kFirstMatch, NULL, 0), |
| 892 | expect_match); |
| 893 | delete prog; |
| 894 | re->Decref(); |
| 895 | } |
| 896 | } |
| 897 | |
| 898 | void SearchBitState(benchmark::State& state, const char* regexp, |
| 899 | const StringPiece& text, Prog::Anchor anchor, |
nothing calls this directly
no test coverage detected