Lines Matching refs:counter
62 RefCallCounter counter;
63 RefCallPtr ptr = fbl::AdoptRef<RefCallCounter>(&counter);
65 EXPECT_TRUE(&counter == ptr.get(), ".get() should point to object");
67 EXPECT_TRUE(&counter == &(*ptr), "operator*");
70 EXPECT_EQ(0, counter.add_ref_calls());
71 EXPECT_EQ(0, counter.release_calls());
78 EXPECT_EQ(1, counter.add_ref_calls());
79 EXPECT_EQ(0, counter.release_calls());
83 EXPECT_EQ(1, counter.add_ref_calls());
84 EXPECT_EQ(1, counter.release_calls());
96 EXPECT_EQ(1, counter.add_ref_calls());
97 EXPECT_EQ(1, counter.release_calls());
101 EXPECT_TRUE(&counter == ptr2.get());
106 EXPECT_EQ(1, counter.add_ref_calls());
107 EXPECT_EQ(1, counter.release_calls());
114 EXPECT_EQ(1, counter.add_ref_calls());
115 EXPECT_EQ(1, counter.release_calls());
119 EXPECT_TRUE(&counter == ptr2.get());
126 EXPECT_EQ(1, counter.add_ref_calls());
127 EXPECT_EQ(2, counter.release_calls());
461 // Note: counter to intuition, we actually do expect this to bump the