summaryrefslogtreecommitdiff
path: root/tests/test_signal_move.cc
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2017-07-21 08:40:04 +0200
committerMurray Cumming <murrayc@murrayc.com>2017-07-21 08:40:06 +0200
commit4986e90562311e91b23a451bcc2cb9edd50fdaca (patch)
tree399cbd291f4bdac4dc51c650dc9c1a9ac4701ecc /tests/test_signal_move.cc
parent3ff8ca086fdb327c3f87a8d61a19a5cd8e826926 (diff)
downloadsigc++-4986e90562311e91b23a451bcc2cb9edd50fdaca.tar.gz
Tests: Add comments by uses after move.
Because we really do want to test this. We do not explicitly promise that it's safe to use moved-from libsigc++ objects, but we choose to make it safe.
Diffstat (limited to 'tests/test_signal_move.cc')
-rw-r--r--tests/test_signal_move.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_signal_move.cc b/tests/test_signal_move.cc
index 82080c1..83a6316 100644
--- a/tests/test_signal_move.cc
+++ b/tests/test_signal_move.cc
@@ -35,14 +35,14 @@ main(int argc, char* argv[])
// Test the move constructor:
sigc::signal<int(int)> sig2(std::move(sig));
- sig(-2);
+ sig(-2); // Test that the moved-from slot does nothing.
sig2(2);
util->check_result(result_stream, "foo(int 2)");
// Test the move assignment operator:
sigc::signal<int(int)> sig3;
sig3 = std::move(sig2);
- sig2(-3);
+ sig2(-3); // Test that the moved-from slot does nothing.
sig3(3);
util->check_result(result_stream, "foo(int 3)");