66 ptr1.Emplace(&observer, std::string(
"one"));
69 EXPECT_EQ(1, observer.GetConstructionCount(
"one"));
70 EXPECT_EQ(0, observer.GetDestructionCount(
"one"));
74 EXPECT_EQ(1, observer.GetConstructionCount(
"one"));
75 EXPECT_EQ(0, observer.GetDestructionCount(
"one"));
77 EXPECT_EQ(1, observer.GetConstructionCount(
"one"));
78 EXPECT_EQ(0, observer.GetDestructionCount(
"one"));
80 EXPECT_EQ(1, observer.GetDestructionCount(
"one"));
87 ptr1.Emplace(&observer, std::string(
"one"));
88 ptr1.Emplace(&observer, std::string(
"two"));
89 EXPECT_EQ(1, observer.GetConstructionCount(
"one"));
90 EXPECT_EQ(1, observer.GetConstructionCount(
"two"));
91 EXPECT_EQ(1, observer.GetDestructionCount(
"one"));
92 EXPECT_EQ(0, observer.GetDestructionCount(
"two"));
94 EXPECT_EQ(1, observer.GetDestructionCount(
"two"));
101 ptr1.Emplace(&observer, std::string(
"one"));
103 ptr1.Emplace(&observer, std::string(
"two"));
104 EXPECT_EQ(1, observer.GetConstructionCount(
"one"));
105 EXPECT_EQ(1, observer.GetConstructionCount(
"two"));
106 EXPECT_EQ(0, observer.GetDestructionCount(
"one"));
107 EXPECT_EQ(0, observer.GetDestructionCount(
"two"));
109 EXPECT_EQ(1, observer.GetDestructionCount(
"one"));
110 EXPECT_EQ(1, observer.GetDestructionCount(
"two"));
117 EXPECT_TRUE(ptr.GetPrivateCopy(&observer, std::string(
"one")));
118 EXPECT_EQ(1, observer.GetConstructionCount(
"one"));
119 EXPECT_EQ(0, observer.GetDestructionCount(
"one"));
121 EXPECT_TRUE(ptr.GetPrivateCopy(&observer, std::string(
"one")));
122 EXPECT_EQ(1, observer.GetConstructionCount(
"one"));
123 EXPECT_EQ(0, observer.GetDestructionCount(
"one"));
126 EXPECT_TRUE(ptr.GetPrivateCopy(&observer, std::string(
"one")));
127 EXPECT_EQ(2, observer.GetConstructionCount(
"one"));
128 EXPECT_EQ(0, observer.GetDestructionCount(
"one"));
130 EXPECT_EQ(2, observer.GetConstructionCount(
"one"));
131 EXPECT_EQ(1, observer.GetDestructionCount(
"one"));
133 EXPECT_EQ(2, observer.GetDestructionCount(
"one"));