From 74c3077c9ad4ba7032b4fe21442ff33750b53108 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 14 Feb 2002 12:57:32 +0000 Subject: [PATCH] Added test cases for incomplete and abstract base class types. [SVN r12803] --- call_traits_test.cpp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/call_traits_test.cpp b/call_traits_test.cpp index 5875517..de4d831 100644 --- a/call_traits_test.cpp +++ b/call_traits_test.cpp @@ -268,16 +268,26 @@ int main(int argc, char *argv[ ]) type_test(const int(&)[3], boost::call_traits::reference) type_test(const int(&)[3], boost::call_traits::const_reference) type_test(const int*const, boost::call_traits::param_type) + // test with abstract base class: + type_test(test_abc1, boost::call_traits::value_type) + type_test(test_abc1&, boost::call_traits::reference) + type_test(const test_abc1&, boost::call_traits::const_reference) + type_test(const test_abc1&, boost::call_traits::param_type) #else - std::cout << "You're compiler does not support partial template instantiation, skipping 8 tests (8 errors)" << std::endl; - failures += 8; - test_count += 8; + std::cout << "You're compiler does not support partial template specialiation, skipping 8 tests (8 errors)" << std::endl; + failures += 12; + test_count += 12; #endif #else - std::cout << "You're compiler does not support partial template instantiation, skipping 20 tests (20 errors)" << std::endl; - failures += 20; - test_count += 20; + std::cout << "You're compiler does not support partial template specialiation, skipping 20 tests (20 errors)" << std::endl; + failures += 24; + test_count += 24; #endif + // test with an incomplete type: + type_test(incomplete_type, boost::call_traits::value_type) + type_test(incomplete_type&, boost::call_traits::reference) + type_test(const incomplete_type&, boost::call_traits::const_reference) + type_test(const incomplete_type&, boost::call_traits::param_type) return check_result(argc, argv); } @@ -397,12 +407,12 @@ template struct call_traits_test; #endif #ifdef BOOST_MSVC -unsigned int expected_failures = 10; +unsigned int expected_failures = 14; #elif defined(__SUNPRO_CC) #if(__SUNPRO_CC <= 0x520) -unsigned int expected_failures = 14; +unsigned int expected_failures = 18; #elif(__SUNPRO_CC <= 0x530) -unsigned int expected_failures = 13; +unsigned int expected_failures = 17; #else unsigned int expected_failures = 6; #endif @@ -411,7 +421,7 @@ unsigned int expected_failures = 2; #elif defined(__GNUC__) unsigned int expected_failures = 4; #elif defined(__HP_aCC) -unsigned int expected_failures = 20; +unsigned int expected_failures = 24; #else unsigned int expected_failures = 0; #endif