|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53393 - trunk/libs/signals2/test
From: fmhess_at_[hidden]
Date: 2009-05-29 11:16:04
Author: fmhess
Date: 2009-05-29 11:16:04 EDT (Fri, 29 May 2009)
New Revision: 53393
URL: http://svn.boost.org/trac/boost/changeset/53393
Log:
Added some tests for std::unary_function/std::binary_function
typedefs.
Text files modified:
trunk/libs/signals2/test/signal_test.cpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
Modified: trunk/libs/signals2/test/signal_test.cpp
==============================================================================
--- trunk/libs/signals2/test/signal_test.cpp (original)
+++ trunk/libs/signals2/test/signal_test.cpp 2009-05-29 11:16:04 EDT (Fri, 29 May 2009)
@@ -246,14 +246,22 @@
BOOST_CHECK(typeid(signal_type::result_type) == typeid(boost::optional<int>));
BOOST_CHECK(typeid(signal_type::arg<0>::type) == typeid(double));
BOOST_CHECK(typeid(signal_type::arg<1>::type) == typeid(long));
+ BOOST_CHECK(typeid(signal_type::arg<0>::type) == typeid(signal_type::first_argument_type));
+ BOOST_CHECK(typeid(signal_type::arg<1>::type) == typeid(signal_type::second_argument_type));
BOOST_CHECK(typeid(signal_type::signature_type) == typeid(int (double, long)));
BOOST_CHECK(signal_type::arity == 2);
BOOST_CHECK(typeid(slot_type::result_type) == typeid(signal_type::slot_result_type));
BOOST_CHECK(typeid(slot_type::arg<0>::type) == typeid(signal_type::arg<0>::type));
BOOST_CHECK(typeid(slot_type::arg<1>::type) == typeid(signal_type::arg<1>::type));
+ BOOST_CHECK(typeid(slot_type::arg<0>::type) == typeid(slot_type::first_argument_type));
+ BOOST_CHECK(typeid(slot_type::arg<1>::type) == typeid(slot_type::second_argument_type));
BOOST_CHECK(typeid(slot_type::signature_type) == typeid(signal_type::signature_type));
BOOST_CHECK(slot_type::arity == signal_type::arity);
+
+ typedef boost::signals2::signal<void (short)> unary_signal_type;
+ BOOST_CHECK(typeid(unary_signal_type::argument_type) == typeid(short));
+ BOOST_CHECK(typeid(unary_signal_type::slot_type::argument_type) == typeid(short));
}
int
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