diff --git a/test/algorithms/comparable_distance.cpp b/test/algorithms/comparable_distance.cpp index 1df2e6a45..8ecbc57ee 100644 --- a/test/algorithms/comparable_distance.cpp +++ b/test/algorithms/comparable_distance.cpp @@ -184,19 +184,18 @@ struct test_variant_different_default_strategy variant_type v1, v2; + using variant_cdistance_t = typename bg::comparable_distance_result + < + variant_type, variant_type, bg::default_strategy + >::type; + using cdistance_t = typename bg::comparable_distance_result + < + point_type, point_type, bg::default_strategy + >::type; BOOST_GEOMETRY_STATIC_ASSERT( - (std::is_same - < - typename bg::comparable_distance_result - < - variant_type, variant_type, bg::default_strategy - >::type, - typename bg::comparable_distance_result - < - point_type, point_type, bg::default_strategy - >::type - >::value), - "Unexpected result type"); + (std::is_same::value), + "Unexpected result type", + variant_cdistance_t, cdistance_t); // Default strategy v1 = point; @@ -257,27 +256,23 @@ struct test_variant_same_default_strategy variant_type v1, v2; + using variant_cdistance_t = typename bg::comparable_distance_result + < + variant_type, variant_type, bg::default_strategy + >::type; BOOST_GEOMETRY_STATIC_ASSERT( - (std::is_same - < - typename bg::comparable_distance_result - < - variant_type, variant_type, bg::default_strategy - >::type, - ExpectedResultType - >::value), - "Unexpected result type"); + (std::is_same::value), + "Unexpected result type", + variant_cdistance_t, ExpectedResultType); + using cdistance_t = typename bg::comparable_distance_result + < + point_type, point_type, bg::default_strategy + >::type; BOOST_GEOMETRY_STATIC_ASSERT( - (std::is_same - < - typename bg::comparable_distance_result - < - point_type, point_type, bg::default_strategy - >::type, - ExpectedResultType - >::value), - "Unexpected result type"); + (std::is_same::value), + "Unexpected result type", + cdistance_t, ExpectedResultType); // Default strategy v1 = point; @@ -348,27 +343,23 @@ struct test_variant_with_strategy strategy_type strategy; + using variant_cdistance_t = typename bg::comparable_distance_result + < + variant_type, variant_type, strategy_type + >::type; BOOST_GEOMETRY_STATIC_ASSERT( - (std::is_same - < - typename bg::comparable_distance_result - < - variant_type, variant_type, strategy_type - >::type, - ExpectedResultType - >::value), - "Unexpected result type"); + (std::is_same::value), + "Unexpected result type", + variant_cdistance_t, ExpectedResultType); + using cdistance_t = typename bg::comparable_distance_result + < + segment_type, linestring_type, strategy_type + >::type; BOOST_GEOMETRY_STATIC_ASSERT( - (std::is_same - < - typename bg::comparable_distance_result - < - segment_type, linestring_type, strategy_type - >::type, - ExpectedResultType - >::value), - "Unexpected result type"); + (std::is_same::value), + "Unexpected result type", + cdistance_t, ExpectedResultType); // Passed strategy v1 = seg; @@ -462,17 +453,14 @@ struct test_variant_boxes typename bg::util::detail::default_integral::type >::type expected_result_type; + using variant_cdistance_t = typename bg::comparable_distance_result + < + variant_type, variant_type, bg::default_strategy + >::type; BOOST_GEOMETRY_STATIC_ASSERT( - (std::is_same - < - typename bg::comparable_distance_result - < - variant_type, variant_type, bg::default_strategy - >::type, - expected_result_type - >::value), - "Unexpected result type" - ); + (std::is_same::value), + "Unexpected result type", + variant_cdistance_t, expected_result_type); // Default strategy check_result::apply(bg::comparable_distance(v1, v2), diff --git a/test/algorithms/distance/distance.cpp b/test/algorithms/distance/distance.cpp index dbf66afe0..6f1a7b6a4 100644 --- a/test/algorithms/distance/distance.cpp +++ b/test/algorithms/distance/distance.cpp @@ -84,7 +84,8 @@ void test_distance_point() typedef typename services::return_type::type cab_return_type; BOOST_GEOMETRY_STATIC_ASSERT( (std::is_same::type>::value), - "Unexpected result type"); + "Unexpected result type", + cab_return_type, typename bg::coordinate_type

::type); taxicab_distance tcd; cab_return_type d = bg::distance(p1, p2, tcd); @@ -460,16 +461,14 @@ void test_variant() variant_type v1, v2; + using distance_t = typename bg::distance_result + < + variant_type, variant_type, bg::default_strategy + >::type; BOOST_GEOMETRY_STATIC_ASSERT( - (std::is_same - < - typename bg::distance_result - < - variant_type, variant_type, bg::default_strategy - >::type, - double - >::value), - "Unexpected result type"); + (std::is_same::value), + "Unexpected result type", + distance_t, double); // Default strategy v1 = point; diff --git a/test/algorithms/distance/distance_brute_force.hpp b/test/algorithms/distance/distance_brute_force.hpp index 64ad16cd6..7c975cc1f 100644 --- a/test/algorithms/distance/distance_brute_force.hpp +++ b/test/algorithms/distance/distance_brute_force.hpp @@ -59,9 +59,11 @@ struct distance_from_bg Strategy const& strategy) { BOOST_GEOMETRY_STATIC_ASSERT((use_distance_from_bg::value), - "Unexpected kind of Geometry1"); + "Unexpected kind of Geometry1", + Geometry1); BOOST_GEOMETRY_STATIC_ASSERT((use_distance_from_bg::value), - "Unexpected kind of Geometry1"); + "Unexpected kind of Geometry2", + Geometry2); return geometry::distance(geometry1, geometry2, strategy); } diff --git a/test/util/math_sqrt.cpp b/test/util/math_sqrt.cpp index e06bc05af..9e3688b3d 100644 --- a/test/util/math_sqrt.cpp +++ b/test/util/math_sqrt.cpp @@ -64,7 +64,9 @@ template inline void check_sqrt(Argument const& arg, Result const& result) { using return_type = typename bg::math::detail::square_root::return_type; - BOOST_GEOMETRY_STATIC_ASSERT((std::is_same::value), "Wrong return type"); + BOOST_GEOMETRY_STATIC_ASSERT((std::is_same::value), + "Wrong return type", + return_type, Result); #ifdef BOOST_GEOMETRY_TEST_DEBUG std::cout << "testing: " << typeid(Result).name()