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

Function SearchPCRE

extern/re2/re2/testing/regexp_benchmark.cc:914–925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

912}
913
914void SearchPCRE(benchmark::State& state, const char* regexp,
915 const StringPiece& text, Prog::Anchor anchor,
916 bool expect_match) {
917 for (auto _ : state) {
918 PCRE re(regexp, PCRE::UTF8);
919 CHECK_EQ(re.error(), "");
920 if (anchor == Prog::kAnchored)
921 CHECK_EQ(PCRE::FullMatch(text, re), expect_match);
922 else
923 CHECK_EQ(PCRE::PartialMatch(text, re), expect_match);
924 }
925}
926
927void SearchRE2(benchmark::State& state, const char* regexp,
928 const StringPiece& text, Prog::Anchor anchor,

Callers

nothing calls this directly

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected