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

Function TEST

extern/re2/re2/testing/regexp_test.cc:19–28  ·  view source on GitHub ↗

Test that overflowed ref counts work.

Source from the content-addressed store, hash-verified

17
18// Test that overflowed ref counts work.
19TEST(Regexp, BigRef) {
20 Regexp* re;
21 re = Regexp::Parse("x", Regexp::NoParseFlags, NULL);
22 for (int i = 0; i < 100000; i++)
23 re->Incref();
24 for (int i = 0; i < 100000; i++)
25 re->Decref();
26 ASSERT_EQ(re->Ref(), 1);
27 re->Decref();
28}
29
30// Test that very large Concats work.
31// Depends on overflowed ref counts working.

Callers

nothing calls this directly

Calls 11

ParseFunction · 0.85
RefMethod · 0.80
NumCapturesMethod · 0.80
NamedCapturesMethod · 0.80
CaptureNamesMethod · 0.80
IncrefMethod · 0.45
DecrefMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
ToStringMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected