|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50318 - sandbox/thread_safe_signals/trunk/libs/signals2/test
From: fmhess_at_[hidden]
Date: 2008-12-18 17:03:52
Author: fmhess
Date: 2008-12-18 17:03:52 EST (Thu, 18 Dec 2008)
New Revision: 50318
URL: http://svn.boost.org/trac/boost/changeset/50318
Log:
Added test of tracking a null but not empty shared_ptr.
Text files modified:
sandbox/thread_safe_signals/trunk/libs/signals2/test/track_test.cpp | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
Modified: sandbox/thread_safe_signals/trunk/libs/signals2/test/track_test.cpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/test/track_test.cpp (original)
+++ sandbox/thread_safe_signals/trunk/libs/signals2/test/track_test.cpp 2008-12-18 17:03:52 EST (Thu, 18 Dec 2008)
@@ -100,5 +100,14 @@
BOOST_CHECK(s1(4) == 4);
}
BOOST_CHECK(s1(4) == 0);
+
+ // Test tracking of null but not empty shared_ptr
+ BOOST_CHECK(s1(2) == 0);
+ {
+ boost::shared_ptr<int> shorty((int*)(0));
+ s1.connect(sig_type::slot_type(swallow(), shorty.get(), _1).track(shorty));
+ BOOST_CHECK(s1(2) == 2);
+ }
+ BOOST_CHECK(s1(2) == 0);
return 0;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk