From a2b3727caf8d7fb6b19f99ca99bae2d4a9876516 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 8 Feb 2014 13:00:31 +0000 Subject: [PATCH] Fix some GCC warnings by actually testing the types generated. --- test/common_type_2_test.cpp | 5 +++++ test/common_type_test.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/test/common_type_2_test.cpp b/test/common_type_2_test.cpp index 99ada63..8a4e746 100644 --- a/test/common_type_2_test.cpp +++ b/test/common_type_2_test.cpp @@ -90,13 +90,18 @@ TT_TEST_BEGIN(common_type) #ifndef __SUNPRO_CC assignation_2(); typedef tt::common_type::type T1; + BOOST_CHECK_TYPE(T1, C1C2); typedef tt::common_type::type T2; + BOOST_CHECK_TYPE(T2, C2*); typedef tt::common_type::type T3; + BOOST_CHECK_TYPE(T3, int const*); #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) // fails if BOOST_COMMON_TYPE_DONT_USE_TYPEOF: typedef tt::common_type::type T4; + BOOST_CHECK_TYPE(T4, int const volatile*); #endif typedef tt::common_type::type T5; + BOOST_CHECK_TYPE(T5, int volatile*); assignation_2(); assignation_2(); diff --git a/test/common_type_test.cpp b/test/common_type_test.cpp index 87a43e5..111cbb1 100644 --- a/test/common_type_test.cpp +++ b/test/common_type_test.cpp @@ -87,13 +87,18 @@ TT_TEST_BEGIN(common_type) { assignation_2(); typedef tt::common_type::type T1; + BOOST_CHECK_TYPE(T1, C1C2); typedef tt::common_type::type T2; + BOOST_CHECK_TYPE(T2, C2*); typedef tt::common_type::type T3; + BOOST_CHECK_TYPE(T3, int const*); #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) // fails if BOOST_COMMON_TYPE_DONT_USE_TYPEOF: typedef tt::common_type::type T4; + BOOST_CHECK_TYPE(T4, int const volatile*); #endif typedef tt::common_type::type T5; + BOOST_CHECK_TYPE(T5, int volatile*); assignation_2(); assignation_2();