Home | History | Annotate | Download | only in ADT

Lines Matching full:constructable

26 class Constructable {
35 Constructable() : value(0) {
39 Constructable(int val) : value(val) {
43 Constructable(const Constructable & src) {
48 ~Constructable() {
52 Constructable & operator=(const Constructable & src) {
76 friend bool operator==(const Constructable & c0, const Constructable & c1) {
81 operator!=(const Constructable & c0, const Constructable & c1) {
86 int Constructable::numConstructorCalls;
87 int Constructable::numDestructorCalls;
88 int Constructable::numAssignmentCalls;
93 typedef SmallVector<Constructable, 4> VectorType;
99 Constructable::reset();
128 v.push_back(Constructable(i));
138 EXPECT_EQ(0, Constructable::getNumConstructorCalls());
139 EXPECT_EQ(0, Constructable::getNumDestructorCalls());
147 theVector.push_back(Constructable(1));
155 theVector.push_back(Constructable(2));
174 EXPECT_EQ(5, Constructable::getNumConstructorCalls());
175 EXPECT_EQ(5, Constructable::getNumDestructorCalls());
186 EXPECT_EQ(4, Constructable::getNumConstructorCalls());
187 EXPECT_EQ(4, Constructable::getNumDestructorCalls());
198 EXPECT_EQ(6, Constructable::getNumConstructorCalls());
199 EXPECT_EQ(5, Constructable::getNumDestructorCalls());
210 EXPECT_EQ(3, Constructable::getNumConstructorCalls());
211 EXPECT_EQ(1, Constructable::getNumDestructorCalls());
219 theVector.resize(3, Constructable(77));
298 theVector.push_back(Constructable(1));
308 theVector.push_back(Constructable(1));
309 theVector.append(2, Constructable(77));
317 theVector.push_back(Constructable(1));
318 theVector.assign(2, Constructable(77));
345 theVector.insert(theVector.begin() + 1, Constructable(77));
354 theVector.insert(theVector.begin() + 1, 2, Constructable(16));
363 theVector.insert(theVector.begin() + 1, 3, Constructable(77));
397 EXPECT_EQ(0, Constructable::getNumConstructorCalls());
404 EXPECT_EQ(4, Constructable::getNumConstructorCalls());