Lines Matching defs:destroyed
25 explicit DestructionTracker(bool* destroyed)
26 : destroyed_(destroyed) {}
72 bool destroyed = false;
76 fbl::AdoptRef(new (&ac) DestructionTracker<EnableAdoptionValidator>(&destroyed));
79 EXPECT_FALSE(destroyed, "should not be destroyed");
93 EXPECT_FALSE(destroyed, "should not be destroyed after inc/dec pairs");
95 EXPECT_TRUE(destroyed, "should be when RefPtr falls out of scope");
103 bool destroyed = false;
105 auto ptr = fbl::MakeRefCounted<DestructionTracker<EnableAdoptionValidator>>(&destroyed);
106 EXPECT_FALSE(destroyed, "should not be destroyed");
108 EXPECT_TRUE(destroyed, "should be when RefPtr falls out of scope");
110 destroyed = false;
114 &ac, &destroyed);
117 EXPECT_TRUE(destroyed, "should be when RefPtr falls out of scope");
125 bool destroyed = false;
131 fbl::AdoptRef(new (&ac) DestructionTracker<true>(&destroyed));
134 EXPECT_FALSE(destroyed);
136 EXPECT_TRUE(destroyed);
138 // Wrapping the now-destroyed object should trigger an assertion.
153 bool destroyed = false;
155 DestructionTracker<true>* raw = new (&ac) DestructionTracker<true>(&destroyed);
163 EXPECT_FALSE(destroyed);
185 bool destroyed = false;
187 DestructionTracker<true>* raw = new (&ac) DestructionTracker<true>(&destroyed);
195 EXPECT_FALSE(destroyed);
214 bool destroyed = false;
216 DestructionTracker<true>* raw = new (&ac) DestructionTracker<true>(&destroyed);
237 bool destroyed = false;
239 DestructionTracker<true>* raw = new (&ac) DestructionTracker<true>(&destroyed);