Lines Matching refs:MyExistenceWatcher
16 class MyExistenceWatcher {
18 MyExistenceWatcher() { create_called_ = true; }
19 ~MyExistenceWatcher() { delete_called_ = true; }
25 bool MyExistenceWatcher::create_called_ = false;
26 bool MyExistenceWatcher::delete_called_ = false;
29 public ReferenceCountedSingletonFactory<MyExistenceWatcher> {
32 instance_.reset(new MyExistenceWatcher());
42 ReferenceCountedSingletonFactory<MyExistenceWatcher> *factory) {
43 rcsf_ptr<MyExistenceWatcher> ptr(factory);
50 MyExistenceWatcher::delete_called_ = false;
52 EXPECT_TRUE(MyExistenceWatcher::delete_called_);
57 rcsf_ptr<MyExistenceWatcher> ptr(&factory);
59 MyExistenceWatcher::delete_called_ = false;
61 EXPECT_FALSE(MyExistenceWatcher::delete_called_);
66 rcsf_ptr<MyExistenceWatcher> one(&factory), two(&factory);
74 rcsf_ptr<MyExistenceWatcher> one(&factory);
77 MyExistenceWatcher::delete_called_ = false;
79 EXPECT_TRUE(MyExistenceWatcher::delete_called_);
84 rcsf_ptr<MyExistenceWatcher> one(&factory);
87 MyExistenceWatcher::create_called_ = false;
89 EXPECT_FALSE(MyExistenceWatcher::create_called_);
94 rcsf_ptr<MyExistenceWatcher> one(&factory);
96 MyExistenceWatcher::create_called_ = false;
99 EXPECT_TRUE(MyExistenceWatcher::create_called_);
104 rcsf_ptr<MyExistenceWatcher> one(&factory), two(&factory);
106 MyExistenceWatcher::create_called_ = false;
107 MyExistenceWatcher::delete_called_ = false;
109 EXPECT_FALSE(MyExistenceWatcher::delete_called_);
111 EXPECT_FALSE(MyExistenceWatcher::delete_called_);
113 EXPECT_FALSE(MyExistenceWatcher::delete_called_);
115 EXPECT_TRUE(MyExistenceWatcher::create_called_);
121 rcsf_ptr<MyExistenceWatcher> one(&factory);
123 MyExistenceWatcher::create_called_ = false;
124 MyExistenceWatcher::delete_called_ = false;
127 EXPECT_TRUE(MyExistenceWatcher::create_called_);
129 EXPECT_TRUE(MyExistenceWatcher::delete_called_);