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

Function DumpByteMap

extern/re2/re2/testing/compile_test.cc:145–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145static void DumpByteMap(StringPiece pattern, Regexp::ParseFlags flags,
146 std::string* bytemap) {
147 Regexp* re = Regexp::Parse(pattern, flags, NULL);
148 EXPECT_TRUE(re != NULL);
149
150 {
151 Prog* prog = re->CompileToProg(0);
152 EXPECT_TRUE(prog != NULL);
153 *bytemap = prog->DumpByteMap();
154 delete prog;
155 }
156
157 {
158 Prog* prog = re->CompileToReverseProg(0);
159 EXPECT_TRUE(prog != NULL);
160 EXPECT_EQ(*bytemap, prog->DumpByteMap());
161 delete prog;
162 }
163
164 re->Decref();
165}
166
167TEST(TestCompile, Latin1Ranges) {
168 // The distinct byte ranges involved in the Latin-1 dot ([^\n]).

Callers 2

IsOnePassMethod · 0.85
TESTFunction · 0.85

Calls 5

ParseFunction · 0.85
CompileToProgMethod · 0.80
DumpByteMapMethod · 0.80
CompileToReverseProgMethod · 0.80
DecrefMethod · 0.45

Tested by

no test coverage detected