forked from boostorg/integer
Changed control of extra messages to be determined solely by the Boost.Test messaging controls
[SVN r50009]
This commit is contained in:
@ -31,21 +31,6 @@
|
|||||||
|
|
||||||
#include <cstddef> // for std::size_t
|
#include <cstddef> // for std::size_t
|
||||||
#include <ios> // for std::hex
|
#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
|
// Custom types/templates, helper functions, and objects
|
||||||
@ -71,7 +56,7 @@ print_out_template( Tmpl<Value> const &, ValueT setting, char const
|
|||||||
// Too bad the type-id expression couldn't use the compact form "*unused",
|
// 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,
|
// 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).
|
// 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
|
"> specialization with type '" << typeid(typename
|
||||||
Tmpl<Value>::value_type).name() << "' and value '" << std::hex <<
|
Tmpl<Value>::value_type).name() << "' and value '" << std::hex <<
|
||||||
Tmpl<Value>::value << "'." );
|
Tmpl<Value>::value << "'." );
|
||||||
@ -82,7 +67,7 @@ template < typename ValueT, typename T >
|
|||||||
bool
|
bool
|
||||||
print_out_template( T const &, ValueT setting, char const *template_name )
|
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." );
|
"> specialization." );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -58,8 +58,6 @@
|
|||||||
#include <algorithm> // for std::binary_search
|
#include <algorithm> // for std::binary_search
|
||||||
#include <climits> // for ULONG_MAX, LONG_MAX, LONG_MIN, etc.
|
#include <climits> // for ULONG_MAX, LONG_MAX, LONG_MIN, etc.
|
||||||
#include <cstddef> // for std::size_t
|
#include <cstddef> // for std::size_t
|
||||||
#include <iostream> // for std::cout
|
|
||||||
#include <ostream> // for std::endl
|
|
||||||
#include <typeinfo> // for std::type_info
|
#include <typeinfo> // for std::type_info
|
||||||
|
|
||||||
|
|
||||||
@ -68,12 +66,6 @@
|
|||||||
#define CONTROL_FAST_SHORT long
|
#define CONTROL_FAST_SHORT long
|
||||||
#endif
|
#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
|
// 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!
|
// For me, full counts increase compile time from 90 seconds to 20 minutes!
|
||||||
#ifndef CONTROL_FULL_COUNTS
|
#ifndef CONTROL_FULL_COUNTS
|
||||||
@ -95,14 +87,6 @@ namespace boost
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 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
|
// Custom types/templates, helper functions, and objects
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@ -272,7 +256,7 @@ print_out_template( Tmpl<Value> const &, ValueT setting, char const
|
|||||||
// Too bad the type-id expression couldn't use the compact form "*unused",
|
// 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,
|
// 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).
|
// 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
|
<< template_post_name << " specialization, with type '" << typeid(typename
|
||||||
Tmpl<Value>::type).name() << "'." );
|
Tmpl<Value>::type).name() << "'." );
|
||||||
return true;
|
return true;
|
||||||
@ -283,7 +267,7 @@ bool
|
|||||||
print_out_template( T const &, ValueT setting, char const *template_pre_name,
|
print_out_template( T const &, ValueT setting, char const *template_pre_name,
|
||||||
char const *template_post_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." );
|
<< template_post_name << " specialization? It doesn't exist." );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user