Lines Matching refs:NonDefaultConstructible
16 struct NonDefaultConstructible { struct
20 explicit NonDefaultConstructible(int) { in NonDefaultConstructible() argument
22 NonDefaultConstructible(const NonDefaultConstructible&) { in NonDefaultConstructible() function
25 NonDefaultConstructible &operator=(const NonDefaultConstructible&) { in operator =() argument
29 ~NonDefaultConstructible() { in ~NonDefaultConstructible() argument
39 unsigned NonDefaultConstructible::CopyConstructions = 0;
40 unsigned NonDefaultConstructible::Destructions = 0;
41 unsigned NonDefaultConstructible::CopyAssignments = 0;
48 Optional<NonDefaultConstructible> O; in TEST_F()
53 NonDefaultConstructible::ResetCounts(); in TEST_F()
54 Optional<NonDefaultConstructible> O(NonDefaultConstructible(3)); in TEST_F()
55 EXPECT_EQ(1u, NonDefaultConstructible::CopyConstructions); in TEST_F()
56 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
57 EXPECT_EQ(1u, NonDefaultConstructible::Destructions); in TEST_F()
58 NonDefaultConstructible::ResetCounts(); in TEST_F()
60 EXPECT_EQ(0u, NonDefaultConstructible::CopyConstructions); in TEST_F()
61 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
62 EXPECT_EQ(1u, NonDefaultConstructible::Destructions); in TEST_F()
66 NonDefaultConstructible::ResetCounts(); in TEST_F()
67 Optional<NonDefaultConstructible>(NonDefaultConstructible(3)); in TEST_F()
68 EXPECT_EQ(1u, NonDefaultConstructible::CopyConstructions); in TEST_F()
69 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
70 EXPECT_EQ(2u, NonDefaultConstructible::Destructions); in TEST_F()
74 NonDefaultConstructible::ResetCounts(); in TEST_F()
76 Optional<NonDefaultConstructible> A(NonDefaultConstructible(3)); in TEST_F()
77 EXPECT_EQ(1u, NonDefaultConstructible::CopyConstructions); in TEST_F()
78 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
79 EXPECT_EQ(1u, NonDefaultConstructible::Destructions); in TEST_F()
80 NonDefaultConstructible::ResetCounts(); in TEST_F()
81 Optional<NonDefaultConstructible> B(A); in TEST_F()
82 EXPECT_EQ(1u, NonDefaultConstructible::CopyConstructions); in TEST_F()
83 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
84 EXPECT_EQ(0u, NonDefaultConstructible::Destructions); in TEST_F()
85 NonDefaultConstructible::ResetCounts(); in TEST_F()
87 EXPECT_EQ(0u, NonDefaultConstructible::CopyConstructions); in TEST_F()
88 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
89 EXPECT_EQ(2u, NonDefaultConstructible::Destructions); in TEST_F()
93 NonDefaultConstructible::ResetCounts(); in TEST_F()
95 Optional<NonDefaultConstructible> A(NonDefaultConstructible(3)); in TEST_F()
96 Optional<NonDefaultConstructible> B; in TEST_F()
97 EXPECT_EQ(1u, NonDefaultConstructible::CopyConstructions); in TEST_F()
98 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
99 EXPECT_EQ(1u, NonDefaultConstructible::Destructions); in TEST_F()
100 NonDefaultConstructible::ResetCounts(); in TEST_F()
102 EXPECT_EQ(1u, NonDefaultConstructible::CopyConstructions); in TEST_F()
103 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
104 EXPECT_EQ(0u, NonDefaultConstructible::Destructions); in TEST_F()
105 NonDefaultConstructible::ResetCounts(); in TEST_F()
107 EXPECT_EQ(0u, NonDefaultConstructible::CopyConstructions); in TEST_F()
108 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
109 EXPECT_EQ(2u, NonDefaultConstructible::Destructions); in TEST_F()
113 NonDefaultConstructible::ResetCounts(); in TEST_F()
115 Optional<NonDefaultConstructible> A(NonDefaultConstructible(3)); in TEST_F()
116 Optional<NonDefaultConstructible> B(NonDefaultConstructible(4)); in TEST_F()
117 EXPECT_EQ(2u, NonDefaultConstructible::CopyConstructions); in TEST_F()
118 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
119 EXPECT_EQ(2u, NonDefaultConstructible::Destructions); in TEST_F()
120 NonDefaultConstructible::ResetCounts(); in TEST_F()
122 EXPECT_EQ(0u, NonDefaultConstructible::CopyConstructions); in TEST_F()
123 EXPECT_EQ(1u, NonDefaultConstructible::CopyAssignments); in TEST_F()
124 EXPECT_EQ(0u, NonDefaultConstructible::Destructions); in TEST_F()
125 NonDefaultConstructible::ResetCounts(); in TEST_F()
127 EXPECT_EQ(0u, NonDefaultConstructible::CopyConstructions); in TEST_F()
128 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
129 EXPECT_EQ(2u, NonDefaultConstructible::Destructions); in TEST_F()
133 NonDefaultConstructible::ResetCounts(); in TEST_F()
135 Optional<NonDefaultConstructible> A; in TEST_F()
136 Optional<NonDefaultConstructible> B(NonDefaultConstructible(3)); in TEST_F()
137 EXPECT_EQ(1u, NonDefaultConstructible::CopyConstructions); in TEST_F()
138 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
139 EXPECT_EQ(1u, NonDefaultConstructible::Destructions); in TEST_F()
140 NonDefaultConstructible::ResetCounts(); in TEST_F()
142 EXPECT_EQ(0u, NonDefaultConstructible::CopyConstructions); in TEST_F()
143 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
144 EXPECT_EQ(1u, NonDefaultConstructible::Destructions); in TEST_F()
145 NonDefaultConstructible::ResetCounts(); in TEST_F()
147 EXPECT_EQ(0u, NonDefaultConstructible::CopyConstructions); in TEST_F()
148 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
149 EXPECT_EQ(0u, NonDefaultConstructible::Destructions); in TEST_F()
153 NonDefaultConstructible::ResetCounts(); in TEST_F()
155 Optional<NonDefaultConstructible> A; in TEST_F()
156 Optional<NonDefaultConstructible> B; in TEST_F()
157 EXPECT_EQ(0u, NonDefaultConstructible::CopyConstructions); in TEST_F()
158 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
159 EXPECT_EQ(0u, NonDefaultConstructible::Destructions); in TEST_F()
160 NonDefaultConstructible::ResetCounts(); in TEST_F()
162 EXPECT_EQ(0u, NonDefaultConstructible::CopyConstructions); in TEST_F()
163 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
164 EXPECT_EQ(0u, NonDefaultConstructible::Destructions); in TEST_F()
165 NonDefaultConstructible::ResetCounts(); in TEST_F()
167 EXPECT_EQ(0u, NonDefaultConstructible::CopyConstructions); in TEST_F()
168 EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments); in TEST_F()
169 EXPECT_EQ(0u, NonDefaultConstructible::Destructions); in TEST_F()