Test that overflowed ref counts work.
| 17 | |
| 18 | // Test that overflowed ref counts work. |
| 19 | TEST(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. |
nothing calls this directly
no test coverage detected