Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50009 - trunk/libs/integer/test
From: dwalker07_at_[hidden]
Date: 2008-11-29 02:45:03


Author: dlwalker
Date: 2008-11-29 02:45:02 EST (Sat, 29 Nov 2008)
New Revision: 50009
URL: http://svn.boost.org/trac/boost/changeset/50009

Log:
Changed control of extra messages to be determined solely by the Boost.Test messaging controls
Text files modified:
   trunk/libs/integer/test/integer_mask_test.cpp | 19 ++-----------------
   trunk/libs/integer/test/integer_test.cpp | 20 ++------------------
   2 files changed, 4 insertions(+), 35 deletions(-)

Modified: trunk/libs/integer/test/integer_mask_test.cpp
==============================================================================
--- trunk/libs/integer/test/integer_mask_test.cpp (original)
+++ trunk/libs/integer/test/integer_mask_test.cpp 2008-11-29 02:45:02 EST (Sat, 29 Nov 2008)
@@ -31,21 +31,6 @@
 
 #include <cstddef> // for std::size_t
 #include <ios> // for std::hex
-#include <iostream> // for std::cout
-#include <ostream> // for std::endl
-
-
-// Control if events will be printed conventionally, or just logged.
-#ifndef CONTROL_SHOW_TYPES
-#define CONTROL_SHOW_TYPES 0
-#endif
-
-// Logging
-#if CONTROL_SHOW_TYPES
-#define PRIVATE_SHOW_MESSAGE( m ) std::cout << m << std::endl
-#else
-#define PRIVATE_SHOW_MESSAGE( m ) BOOST_TEST_MESSAGE( m )
-#endif
 
 
 // Custom types/templates, helper functions, and objects
@@ -71,7 +56,7 @@
     // Too bad the type-id expression couldn't use the compact form "*unused",
     // but type-ids of dereferenced null pointers throw by order of C++ 2003,
     // sect. 5.2.8, para. 2 (although the result is not conceptually needed).
- PRIVATE_SHOW_MESSAGE( "There is an " << template_name << "<" << setting <<
+ BOOST_TEST_MESSAGE( "There is an " << template_name << "<" << setting <<
      "> specialization with type '" << typeid(typename
      Tmpl<Value>::value_type).name() << "' and value '" << std::hex <<
      Tmpl<Value>::value << "'." );
@@ -82,7 +67,7 @@
 bool
 print_out_template( T const &, ValueT setting, char const *template_name )
 {
- PRIVATE_SHOW_MESSAGE( "There is no " << template_name << "<" << setting <<
+ BOOST_TEST_MESSAGE( "There is no " << template_name << "<" << setting <<
      "> specialization." );
     return false;
 }

Modified: trunk/libs/integer/test/integer_test.cpp
==============================================================================
--- trunk/libs/integer/test/integer_test.cpp (original)
+++ trunk/libs/integer/test/integer_test.cpp 2008-11-29 02:45:02 EST (Sat, 29 Nov 2008)
@@ -58,8 +58,6 @@
 #include <algorithm> // for std::binary_search
 #include <climits> // for ULONG_MAX, LONG_MAX, LONG_MIN, etc.
 #include <cstddef> // for std::size_t
-#include <iostream> // for std::cout
-#include <ostream> // for std::endl
 #include <typeinfo> // for std::type_info
 
 
@@ -68,12 +66,6 @@
 #define CONTROL_FAST_SHORT long
 #endif
 
-// Control if the names of the types for each version
-// of the integer templates will be printed.
-#ifndef CONTROL_SHOW_TYPES
-#define CONTROL_SHOW_TYPES 0
-#endif
-
 // Control if every potential bit-count is used, or only a selection
 // For me, full counts increase compile time from 90 seconds to 20 minutes!
 #ifndef CONTROL_FULL_COUNTS
@@ -95,14 +87,6 @@
 }
 
 
-// Logging
-#if CONTROL_SHOW_TYPES
-#define PRIVATE_SHOW_MESSAGE( m ) std::cout << m << std::endl
-#else
-#define PRIVATE_SHOW_MESSAGE( m ) BOOST_TEST_MESSAGE( m )
-#endif
-
-
 // Custom types/templates, helper functions, and objects
 namespace
 {
@@ -272,7 +256,7 @@
     // Too bad the type-id expression couldn't use the compact form "*unused",
     // but type-ids of dereferenced null pointers throw by order of C++ 2003,
     // sect. 5.2.8, para. 2 (although the result is not conceptually needed).
- PRIVATE_SHOW_MESSAGE( "This is " << template_pre_name << setting
+ BOOST_TEST_MESSAGE( "This is " << template_pre_name << setting
      << template_post_name << " specialization, with type '" << typeid(typename
      Tmpl<Value>::type).name() << "'." );
     return true;
@@ -283,7 +267,7 @@
 print_out_template( T const &, ValueT setting, char const *template_pre_name,
  char const *template_post_name )
 {
- PRIVATE_SHOW_MESSAGE( "Looking for " << template_pre_name << setting
+ BOOST_TEST_MESSAGE( "Looking for " << template_pre_name << setting
      << template_post_name << " specialization? It doesn't exist." );
     return false;
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk