From cac6d3e5acfbdfe5e503a670d5a818dc2faafb37 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 2 Aug 2004 19:31:59 +0000 Subject: [PATCH] Made Python testing more verbose by default Avoid using the Boost.Test library wherever possible. [SVN r24249] --- test/select_arg_to_python_test.cpp | 16 +++++++++------- test/select_holder.cpp | 12 ------------ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/test/select_arg_to_python_test.cpp b/test/select_arg_to_python_test.cpp index df925a54..83735bac 100644 --- a/test/select_arg_to_python_test.cpp +++ b/test/select_arg_to_python_test.cpp @@ -17,13 +17,15 @@ BOOST_PYTHON_DECL bool handle_exception_impl(function0) int result; -#define ASSERT_SAME(T1,T2) \ - if (!is_same< T1, T2 >::value) { \ - std::cout << "*********************\n"; \ - std::cout << python::type_id< T1 >() << " != " << python::type_id< T2 >() << "\n"; \ - std::cout << "*********************\n"; \ - result = 1; \ - } +#define ASSERT_SAME(T1,T2) assert_same< T1,T2 >() + +template +void assert_same(U* = 0, T* = 0) +{ + BOOST_STATIC_ASSERT((boost::is_same::value)); + +} + int main() { diff --git a/test/select_holder.cpp b/test/select_holder.cpp index ff542220..17ad6c30 100644 --- a/test/select_holder.cpp +++ b/test/select_holder.cpp @@ -12,9 +12,6 @@ #include #include -#define BOOST_INCLUDE_MAIN -#include - struct BR {}; struct Base {}; @@ -33,7 +30,6 @@ namespace boost { namespace python template void assert_same(U* = 0, T* = 0) { - BOOST_TEST((boost::is_same::value)); BOOST_STATIC_ASSERT((boost::is_same::value)); } @@ -79,11 +75,3 @@ int test_main(int, char * []) return 0; } -#if !defined(_WIN32) || defined(__GNUC__) -// This definition is needed for MinGW 2.95.2 and KCC on OSF for some -// reason, but will break other Win32 compilers. -namespace boost { namespace python -{ - bool handle_exception_impl(boost::function0) { return false; } -}} -#endif