|
Boost-Commit : |
From: fmhess_at_[hidden]
Date: 2008-03-11 11:10:08
Author: fmhess
Date: 2008-03-11 11:10:07 EDT (Tue, 11 Mar 2008)
New Revision: 43562
URL: http://svn.boost.org/trac/boost/changeset/43562
Log:
Added test for problem with signalslib::detail::grouped_list
copy construction.
Text files modified:
sandbox/thread_safe_signals/libs/thread_safe_signals/test/regression_test.cpp | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
Modified: sandbox/thread_safe_signals/libs/thread_safe_signals/test/regression_test.cpp
==============================================================================
--- sandbox/thread_safe_signals/libs/thread_safe_signals/test/regression_test.cpp (original)
+++ sandbox/thread_safe_signals/libs/thread_safe_signals/test/regression_test.cpp 2008-03-11 11:10:07 EDT (Tue, 11 Mar 2008)
@@ -48,10 +48,17 @@
void slot_connect_test()
{
sig0_type sig;
- sig.connect(sig0_type::slot_type(&my_connecting_slot, boost::ref(sig)));
+ sig.connect(sig0_type::slot_type(&my_connecting_slot, boost::ref(sig)).track(sig));
/* 2008-02-28: the following signal invocation triggered a (bogus) failed assertion of _shared_state.unique()
at detail/signal_template.hpp:285 */
sig();
+ BOOST_CHECK(sig.num_slots() == 2);
+ sig.disconnect(&my_slot);
+ BOOST_CHECK(sig.num_slots() == 1);
+ /* 2008-03-11: checked iterator barfed on next line, due to bad semantics of copy construction
+ for boost::signalslib::detail::grouped_list */
+ sig();
+ BOOST_CHECK(sig.num_slots() == 2);
}
/* 2008-03-10: we weren't disconnecting old connection in scoped_connection assignment operator */
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