You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// check for EXPECT_TRUE(state() != alive_state, ...) has not been done since
254
254
// compiler can optimize out the move ctor call that results in false positive failure
255
-
EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker(MemoryChecker&&): attemp to construct an object from non-existing object");
255
+
EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker(MemoryChecker&&): attempt to construct an object from non-existing object");
256
256
// set constructed state and increment counter for living object
// check for EXPECT_TRUE(state() != alive_state, ...) has not been done since
262
262
// compiler can optimize out the copy ctor call that results in false positive failure
263
-
EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker(const MemoryChecker&): attemp to construct an object from non-existing object");
263
+
EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker(const MemoryChecker&): attempt to construct an object from non-existing object");
264
264
// set constructed state and increment counter for living object
265
265
inc_alive_objects();
266
266
_state = alive_state;
267
267
}
268
268
MemoryChecker& operator=(MemoryChecker&& other) {
269
269
// check if we do not assign over uninitialized memory
270
-
EXPECT_TRUE(state() == alive_state, "wrong effect from MemoryChecker::operator=(MemoryChecker&& other): attemp to assign to non-existing object");
271
-
EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker::operator=(MemoryChecker&& other): attemp to assign from non-existing object");
270
+
EXPECT_TRUE(state() == alive_state, "wrong effect from MemoryChecker::operator=(MemoryChecker&& other): attempt to assign to non-existing object");
271
+
EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker::operator=(MemoryChecker&& other): attempt to assign from non-existing object");
272
272
// just assign new value, counter is the same, state is the same
// check if we do not assign over uninitialized memory
279
-
EXPECT_TRUE(state() == alive_state, "wrong effect from MemoryChecker::operator=(const MemoryChecker& other): attemp to assign to non-existing object");
280
-
EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker::operator=(const MemoryChecker& other): attemp to assign from non-existing object");
279
+
EXPECT_TRUE(state() == alive_state, "wrong effect from MemoryChecker::operator=(const MemoryChecker& other): attempt to assign to non-existing object");
280
+
EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker::operator=(const MemoryChecker& other): attempt to assign from non-existing object");
281
281
// just assign new value, counter is the same, state is the same
282
282
_value = other.value();
283
283
284
284
return *this;
285
285
}
286
286
~MemoryChecker() {
287
287
// check if we do not double destruct the object
288
-
EXPECT_TRUE(state() == alive_state, "wrong effect from ~MemoryChecker(): attemp to destroy non-existing object");
288
+
EXPECT_TRUE(state() == alive_state, "wrong effect from ~MemoryChecker(): attempt to destroy non-existing object");
289
289
// set destructed state and decrement counter for living object
0 commit comments