MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / SearchRE2

Function SearchRE2

extern/re2/re2/testing/regexp_benchmark.cc:927–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

925}
926
927void SearchRE2(benchmark::State& state, const char* regexp,
928 const StringPiece& text, Prog::Anchor anchor,
929 bool expect_match) {
930 for (auto _ : state) {
931 RE2 re(regexp);
932 CHECK_EQ(re.error(), "");
933 if (anchor == Prog::kAnchored)
934 CHECK_EQ(RE2::FullMatch(text, re), expect_match);
935 else
936 CHECK_EQ(RE2::PartialMatch(text, re), expect_match);
937 }
938}
939
940// SearchCachedXXX is like SearchXXX but only does the
941// regexp parsing and compiling once. This lets us measure

Callers

nothing calls this directly

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected