Skip to content

Commit d118d16

Browse files
committed
fix: correct LifetimeWatcher examples
1 parent 6170da8 commit d118d16

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/Watcher.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ TEST_CASE(
109109
other{}; // now create another watched object
110110

111111
// other will be destructed, but there is no existing destruction-expectation
112-
other = source; // a no-match will be reported immediately
112+
other = moved; // a no-match will be reported immediately
113113
};
114114

115115
// Depending on the active reporter, this may either raise an exception or terminate the program.
@@ -147,7 +147,7 @@ TEST_CASE(
147147
mimicpp::LifetimeWatcher>
148148
other{}; // now create another watched object
149149
SCOPED_EXP other.expect_destruct(); // setting it up accordingly
150-
other = source; // other will be destructed and the expectation from the line above fulfilled
150+
other = moved; // other will be destructed and the expectation from the line above fulfilled
151151

152152
// other is now a new instance without an existing destruction-expectation,
153153
// because the copy-operator doesn't semantically copy anything.

test/unit-tests/ObjectWatcher.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ TEST_CASE(
715715
&& Catch::Matchers::EndsWith("my_base"));
716716
}
717717

718-
SECTION("Copy constructed.")
718+
SECTION("Copy assigned.")
719719
{
720720
RelocationWatcher inner{};
721721
inner = watcher.value();

0 commit comments

Comments
 (0)