Lines Matching refs:CountedObject

58 class CountedObject {  class
60 explicit CountedObject(int id) : id_(id) { ++count_; } in CountedObject() function in __anon7030a3a00111::CountedObject
61 ~CountedObject() { --count_; } in ~CountedObject()
71 int CountedObject::count_;
74 typedef AddressMap< AddressType, linked_ptr<CountedObject> > TestMap;
77 ASSERT_EQ(CountedObject::count(), 0); in DoAddressMapTest()
80 linked_ptr<CountedObject> entry; in DoAddressMapTest()
89 ASSERT_EQ(CountedObject::count(), 0); in DoAddressMapTest()
91 linked_ptr<CountedObject>(new CountedObject(0)))); in DoAddressMapTest()
93 ASSERT_EQ(CountedObject::count(), 1); in DoAddressMapTest()
95 ASSERT_EQ(CountedObject::count(), 1); // still holding entry in this scope in DoAddressMapTest()
104 linked_ptr<CountedObject>(new CountedObject(1)))); in DoAddressMapTest()
107 ASSERT_EQ(CountedObject::count(), 1); in DoAddressMapTest()
115 linked_ptr<CountedObject>(new CountedObject(2)))); in DoAddressMapTest()
116 ASSERT_EQ(CountedObject::count(), 2); in DoAddressMapTest()
118 linked_ptr<CountedObject>(new CountedObject(3)))); in DoAddressMapTest()
120 linked_ptr<CountedObject>(new CountedObject(4)))); in DoAddressMapTest()
122 linked_ptr<CountedObject>(new CountedObject(5)))); // already in map in DoAddressMapTest()
124 linked_ptr<CountedObject>(new CountedObject(6)))); in DoAddressMapTest()
126 linked_ptr<CountedObject>(new CountedObject(7)))); in DoAddressMapTest()
175 ASSERT_EQ(CountedObject::count(), 6); in DoAddressMapTest()
185 ASSERT_EQ(CountedObject::count(), 0); in RunTests()