diff --git a/test/is_convertible_test.cpp b/test/is_convertible_test.cpp index e30358d..efdb16d 100644 --- a/test/is_convertible_test.cpp +++ b/test/is_convertible_test.cpp @@ -18,6 +18,11 @@ struct convertible_from convertible_from(T); }; +struct base2 { }; +struct middle2 : virtual base2 { }; +struct derived2 : middle2 { }; + + TT_TEST_BEGIN(is_convertible) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); @@ -27,6 +32,18 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); +#ifndef BOOST_NO_IS_ABSTRACT +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); +#endif // The following four do not compile without member template support: BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); diff --git a/test/test.hpp b/test/test.hpp index 2540fe4..c3c2f63 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -309,6 +309,25 @@ struct test_abc3 : public test_abc1 struct incomplete_type; +struct polymorphic_base +{ + virtual void method(); +}; + +struct polymorphic_derived1 : polymorphic_base +{ +}; + +struct polymorphic_derived2 : polymorphic_base +{ + virtual void method(); +}; + +struct virtual_inherit1 : virtual Base { }; +struct virtual_inherit2 : virtual_inherit1 { }; + + + typedef void foo0_t(); typedef void foo1_t(int); typedef void foo2_t(int&, double);