Skip to content

Commit

Permalink
Use BOOST_TEST_TRAIT_SAME
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Dec 23, 2022
1 parent c225007 commit 53c0840
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/result_arg_types_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/function.hpp>
#include <boost/core/is_same.hpp>
#include <boost/core/lightweight_test_trait.hpp>

struct X
Expand All @@ -27,14 +26,14 @@ int main()
{
typedef boost::function<X(Y)> F1;

BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F1::result_type, X> ));
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F1::argument_type, Y> ));
BOOST_TEST_TRAIT_SAME(F1::result_type, X);
BOOST_TEST_TRAIT_SAME(F1::argument_type, Y);

typedef boost::function<X(Y, Z)> F2;

BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::result_type, X> ));
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::first_argument_type, Y> ));
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::second_argument_type, Z> ));
BOOST_TEST_TRAIT_SAME(F2::result_type, X);
BOOST_TEST_TRAIT_SAME(F2::first_argument_type, Y);
BOOST_TEST_TRAIT_SAME(F2::second_argument_type, Z);

return boost::report_errors();
}

0 comments on commit 53c0840

Please sign in to comment.