diff --git a/test/Jamfile b/test/Jamfile index 29c69cd..87f9ef9 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -597,6 +597,18 @@ test-suite type_traits : ] + [ run $(TYPE_TRAIT_PATH)tricky_incomplete_type_test.cpp + $(TYPE_TRAIT_PATH)type_traits_init + $(TEST_LIB_PATH)unit_test_framework + : + --report_level=detailed --build_info=yes --log_level=messages + : + : + $(BOOST_ROOT) + : + ] + + [ run $(TYPE_TRAIT_PATH)tricky_partial_specialization_test.cpp $(TYPE_TRAIT_PATH)type_traits_init $(TEST_LIB_PATH)unit_test_framework @@ -621,7 +633,7 @@ test-suite type_traits : ] - [ run $(TYPE_TRAIT_PATH)type_with_alignment_test.cpp $(TYPE_TRAIT_PATH)tricky_partial_specialization_test.cpp $(TYPE_TRAIT_PATH)tricky_function_type_test.cpp $(TYPE_TRAIT_PATH)tricky_add_pointer_test.cpp $(TYPE_TRAIT_PATH)tricky_abstract_type_test.cpp $(TYPE_TRAIT_PATH)remove_volatile_test.cpp $(TYPE_TRAIT_PATH)remove_reference_test.cpp $(TYPE_TRAIT_PATH)remove_pointer_test.cpp $(TYPE_TRAIT_PATH)remove_cv_test.cpp $(TYPE_TRAIT_PATH)remove_const_test.cpp $(TYPE_TRAIT_PATH)remove_bounds_test.cpp $(TYPE_TRAIT_PATH)is_volatile_test.cpp $(TYPE_TRAIT_PATH)is_void_test.cpp $(TYPE_TRAIT_PATH)is_union_test.cpp $(TYPE_TRAIT_PATH)is_stateless_test.cpp $(TYPE_TRAIT_PATH)is_scalar_test.cpp $(TYPE_TRAIT_PATH)is_same_test.cpp $(TYPE_TRAIT_PATH)is_reference_test.cpp $(TYPE_TRAIT_PATH)is_polymorphic_test.cpp $(TYPE_TRAIT_PATH)is_pointer_test.cpp $(TYPE_TRAIT_PATH)is_pod_test.cpp $(TYPE_TRAIT_PATH)is_object_test.cpp $(TYPE_TRAIT_PATH)is_member_pointer_test.cpp $(TYPE_TRAIT_PATH)is_member_function_pointer_test.cpp $(TYPE_TRAIT_PATH)is_integral_test.cpp $(TYPE_TRAIT_PATH)is_fundamental_test.cpp $(TYPE_TRAIT_PATH)is_function_test.cpp $(TYPE_TRAIT_PATH)is_float_test.cpp $(TYPE_TRAIT_PATH)is_enum_test.cpp $(TYPE_TRAIT_PATH)is_empty_test.cpp $(TYPE_TRAIT_PATH)is_convertible_test.cpp $(TYPE_TRAIT_PATH)is_const_test.cpp $(TYPE_TRAIT_PATH)is_compound_test.cpp $(TYPE_TRAIT_PATH)is_class_test.cpp $(TYPE_TRAIT_PATH)is_base_and_derived_test.cpp $(TYPE_TRAIT_PATH)is_array_test.cpp $(TYPE_TRAIT_PATH)is_arithmetic_test.cpp $(TYPE_TRAIT_PATH)has_trivial_destructor_test.cpp $(TYPE_TRAIT_PATH)has_trivial_copy_test.cpp $(TYPE_TRAIT_PATH)has_trivial_constructor_test.cpp $(TYPE_TRAIT_PATH)has_trivial_assign_test.cpp $(TYPE_TRAIT_PATH)has_nothrow_copy_test.cpp $(TYPE_TRAIT_PATH)has_nothrow_constructor_test.cpp $(TYPE_TRAIT_PATH)has_nothrow_assign_test.cpp $(TYPE_TRAIT_PATH)function_traits_test.cpp $(TYPE_TRAIT_PATH)alignment_of_test.cpp $(TYPE_TRAIT_PATH)add_volatile_test.cpp $(TYPE_TRAIT_PATH)add_reference_test.cpp $(TYPE_TRAIT_PATH)add_pointer_test.cpp $(TYPE_TRAIT_PATH)add_const_test.cpp + [ run $(TYPE_TRAIT_PATH)type_with_alignment_test.cpp $(TYPE_TRAIT_PATH)tricky_partial_specialization_test.cpp $(TYPE_TRAIT_PATH)tricky_incomplete_type_test.cpp $(TYPE_TRAIT_PATH)tricky_function_type_test.cpp $(TYPE_TRAIT_PATH)tricky_add_pointer_test.cpp $(TYPE_TRAIT_PATH)tricky_abstract_type_test.cpp $(TYPE_TRAIT_PATH)remove_volatile_test.cpp $(TYPE_TRAIT_PATH)remove_reference_test.cpp $(TYPE_TRAIT_PATH)remove_pointer_test.cpp $(TYPE_TRAIT_PATH)remove_cv_test.cpp $(TYPE_TRAIT_PATH)remove_const_test.cpp $(TYPE_TRAIT_PATH)remove_bounds_test.cpp $(TYPE_TRAIT_PATH)is_volatile_test.cpp $(TYPE_TRAIT_PATH)is_void_test.cpp $(TYPE_TRAIT_PATH)is_union_test.cpp $(TYPE_TRAIT_PATH)is_stateless_test.cpp $(TYPE_TRAIT_PATH)is_scalar_test.cpp $(TYPE_TRAIT_PATH)is_same_test.cpp $(TYPE_TRAIT_PATH)is_reference_test.cpp $(TYPE_TRAIT_PATH)is_polymorphic_test.cpp $(TYPE_TRAIT_PATH)is_pointer_test.cpp $(TYPE_TRAIT_PATH)is_pod_test.cpp $(TYPE_TRAIT_PATH)is_object_test.cpp $(TYPE_TRAIT_PATH)is_member_pointer_test.cpp $(TYPE_TRAIT_PATH)is_member_function_pointer_test.cpp $(TYPE_TRAIT_PATH)is_integral_test.cpp $(TYPE_TRAIT_PATH)is_fundamental_test.cpp $(TYPE_TRAIT_PATH)is_function_test.cpp $(TYPE_TRAIT_PATH)is_float_test.cpp $(TYPE_TRAIT_PATH)is_enum_test.cpp $(TYPE_TRAIT_PATH)is_empty_test.cpp $(TYPE_TRAIT_PATH)is_convertible_test.cpp $(TYPE_TRAIT_PATH)is_const_test.cpp $(TYPE_TRAIT_PATH)is_compound_test.cpp $(TYPE_TRAIT_PATH)is_class_test.cpp $(TYPE_TRAIT_PATH)is_base_and_derived_test.cpp $(TYPE_TRAIT_PATH)is_array_test.cpp $(TYPE_TRAIT_PATH)is_arithmetic_test.cpp $(TYPE_TRAIT_PATH)has_trivial_destructor_test.cpp $(TYPE_TRAIT_PATH)has_trivial_copy_test.cpp $(TYPE_TRAIT_PATH)has_trivial_constructor_test.cpp $(TYPE_TRAIT_PATH)has_trivial_assign_test.cpp $(TYPE_TRAIT_PATH)has_nothrow_copy_test.cpp $(TYPE_TRAIT_PATH)has_nothrow_constructor_test.cpp $(TYPE_TRAIT_PATH)has_nothrow_assign_test.cpp $(TYPE_TRAIT_PATH)function_traits_test.cpp $(TYPE_TRAIT_PATH)alignment_of_test.cpp $(TYPE_TRAIT_PATH)add_volatile_test.cpp $(TYPE_TRAIT_PATH)add_reference_test.cpp $(TYPE_TRAIT_PATH)add_pointer_test.cpp $(TYPE_TRAIT_PATH)add_const_test.cpp $(TYPE_TRAIT_PATH)type_traits_init $(TEST_LIB_PATH)unit_test_framework : diff --git a/test/has_nothrow_assign_test.cpp b/test/has_nothrow_assign_test.cpp index 16bc6e6..092dd4f 100644 --- a/test/has_nothrow_assign_test.cpp +++ b/test/has_nothrow_assign_test.cpp @@ -151,7 +151,6 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, tru BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, true, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, false); TT_TEST_END diff --git a/test/has_nothrow_constructor_test.cpp b/test/has_nothrow_constructor_test.cpp index 4c4bd26..d94bcd0 100644 --- a/test/has_nothrow_constructor_test.cpp +++ b/test/has_nothrow_constructor_test.cpp @@ -151,7 +151,6 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, true, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, false); TT_TEST_END diff --git a/test/has_nothrow_copy_test.cpp b/test/has_nothrow_copy_test.cpp index 2f2f249..8a71ca2 100644 --- a/test/has_nothrow_copy_test.cpp +++ b/test/has_nothrow_copy_test.cpp @@ -151,7 +151,6 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true, BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); TT_TEST_END diff --git a/test/has_trivial_assign_test.cpp b/test/has_trivial_assign_test.cpp index 5ea37ed..a1197dc 100644 --- a/test/has_trivial_assign_test.cpp +++ b/test/has_trivial_assign_test.cpp @@ -151,7 +151,6 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, tru BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, true, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, false); TT_TEST_END diff --git a/test/has_trivial_constructor_test.cpp b/test/has_trivial_constructor_test.cpp index 0e9fe4d..132ec68 100644 --- a/test/has_trivial_constructor_test.cpp +++ b/test/has_trivial_constructor_test.cpp @@ -151,7 +151,6 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, true, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, false); TT_TEST_END diff --git a/test/has_trivial_copy_test.cpp b/test/has_trivial_copy_test.cpp index 59c2f65..74ed927 100644 --- a/test/has_trivial_copy_test.cpp +++ b/test/has_trivial_copy_test.cpp @@ -151,7 +151,6 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true, BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, false); TT_TEST_END diff --git a/test/has_trivial_destructor_test.cpp b/test/has_trivial_destructor_test.cpp index 92af4a9..5a498bf 100644 --- a/test/has_trivial_destructor_test.cpp +++ b/test/has_trivial_destructor_test.cpp @@ -151,7 +151,6 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, true, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, false); TT_TEST_END diff --git a/test/is_class_test.cpp b/test/is_class_test.cpp index 571db70..aed9feb 100644 --- a/test/is_class_test.cpp +++ b/test/is_class_test.cpp @@ -32,7 +32,6 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, true); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, false); diff --git a/test/is_compound_test.cpp b/test/is_compound_test.cpp index f7f4ca7..9eae4ea 100644 --- a/test/is_compound_test.cpp +++ b/test/is_compound_test.cpp @@ -15,7 +15,6 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound::value, true); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound::value, true); TT_TEST_END diff --git a/test/is_enum_test.cpp b/test/is_enum_test.cpp index c148be5..5d9eabc 100644 --- a/test/is_enum_test.cpp +++ b/test/is_enum_test.cpp @@ -17,7 +17,6 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); TT_TEST_END diff --git a/test/is_pod_test.cpp b/test/is_pod_test.cpp index 9e45fe6..1d38778 100644 --- a/test/is_pod_test.cpp +++ b/test/is_pod_test.cpp @@ -8,7 +8,7 @@ #include "check_integral_constant.hpp" #include TYPE_TRAITS(is_pod) -TT_TEST_BEGIN(is_POD) +TT_TEST_BEGIN(is_pod) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_POD::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_POD::value, true); @@ -146,7 +146,6 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_POD::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_POD::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_POD::value, true); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_POD::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_POD::value, false); // cases we would like to succeed but can't implement in the language: diff --git a/test/is_polymorphic_test.cpp b/test/is_polymorphic_test.cpp index 389cac8..e6aaac6 100644 --- a/test/is_polymorphic_test.cpp +++ b/test/is_polymorphic_test.cpp @@ -29,8 +29,6 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); diff --git a/test/is_scalar_test.cpp b/test/is_scalar_test.cpp index 6b41c2e..70e0650 100644 --- a/test/is_scalar_test.cpp +++ b/test/is_scalar_test.cpp @@ -140,7 +140,6 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, false); TT_TEST_END diff --git a/test/tricky_abstract_type_test.cpp b/test/tricky_abstract_type_test.cpp index 5f07bba..01d2c9f 100644 --- a/test/tricky_abstract_type_test.cpp +++ b/test/tricky_abstract_type_test.cpp @@ -9,7 +9,7 @@ #include TYPE_TRAITS(is_empty) #include TYPE_TRAITS(is_stateless) -TT_TEST_BEGIN(abstract_type_tricky_tests) +TT_TEST_BEGIN(tricky_abstract_type_test) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless::value, false); diff --git a/test/tricky_add_pointer_test.cpp b/test/tricky_add_pointer_test.cpp index fd4c0e6..d242f6c 100644 --- a/test/tricky_add_pointer_test.cpp +++ b/test/tricky_add_pointer_test.cpp @@ -16,7 +16,7 @@ BOOST_DECL_TRANSFORM_TEST(add_pointer_test_12, ::boost::add_pointer, const[2][3] BOOST_DECL_TRANSFORM_TEST(add_pointer_test_13, ::boost::add_pointer, (&)[2], (*)[2]) -TT_TEST_BEGIN(partial_specialization_tricky_tests) +TT_TEST_BEGIN(trichy_partial_specialization_test) add_pointer_test_5(); add_pointer_test_6(); diff --git a/test/tricky_function_type_test.cpp b/test/tricky_function_type_test.cpp index ff6e639..5a8b980 100644 --- a/test/tricky_function_type_test.cpp +++ b/test/tricky_function_type_test.cpp @@ -11,7 +11,7 @@ #include TYPE_TRAITS(is_enum) #include TYPE_TRAITS(is_class) #include TYPE_TRAITS(is_scalar) -#include TYPE_TRAITS(is_POD) +#include TYPE_TRAITS(is_pod) #include TYPE_TRAITS(has_trivial_constructor) #include TYPE_TRAITS(has_trivial_copy) #include TYPE_TRAITS(has_trivial_assign) @@ -19,7 +19,7 @@ #include TYPE_TRAITS(is_compound) #include TYPE_TRAITS(is_base_and_derived) -TT_TEST_BEGIN(is_function) +TT_TEST_BEGIN(tricky_function_type_test) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, false); diff --git a/test/tricky_incomplete_type_test.cpp b/test/tricky_incomplete_type_test.cpp new file mode 100644 index 0000000..3ae60f8 --- /dev/null +++ b/test/tricky_incomplete_type_test.cpp @@ -0,0 +1,27 @@ + +// (C) Copyright John Maddock 2000. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. + +#include "test.hpp" +#include "check_integral_constant.hpp" +#include + +TT_TEST_BEGIN(tricky_incomplete_type_test) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_POD::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, false); + +TT_TEST_END + diff --git a/test/tricky_partial_specialization_test.cpp b/test/tricky_partial_specialization_test.cpp index d3a3743..fd48351 100644 --- a/test/tricky_partial_specialization_test.cpp +++ b/test/tricky_partial_specialization_test.cpp @@ -36,7 +36,7 @@ struct align_calc #define ALIGNOF(x) align_calc::get() -TT_TEST_BEGIN(partial_specialization_tricky_tests) +TT_TEST_BEGIN(tricky_partial_specialization_test) // // corner cases which don't compile without partial specialization // support: diff --git a/test/type_with_alignment_test.cpp b/test/type_with_alignment_test.cpp index ba3379b..a81f803 100644 --- a/test/type_with_alignment_test.cpp +++ b/test/type_with_alignment_test.cpp @@ -8,7 +8,7 @@ #include "check_integral_constant.hpp" #include TYPE_TRAITS(alignment_of) #include TYPE_TRAITS(type_with_alignment) -#include TYPE_TRAITS(is_POD) +#include TYPE_TRAITS(is_pod) TT_TEST_BEGIN(type_with_alignment)