ndnboost: Also rename BOOST_ to NDNBOOST_
diff --git a/include/ndnboost/test/impl/compiler_log_formatter.ipp b/include/ndnboost/test/impl/compiler_log_formatter.ipp
index e153920..1d83f60 100644
--- a/include/ndnboost/test/impl/compiler_log_formatter.ipp
+++ b/include/ndnboost/test/impl/compiler_log_formatter.ipp
@@ -12,8 +12,8 @@
// Description : implements compiler like Log formatter
// ***************************************************************************
-#ifndef BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
-#define BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
+#ifndef NDNBOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
+#define NDNBOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
// Boost.Test
#include <ndnboost/test/output/compiler_log_formatter.hpp>
@@ -49,7 +49,7 @@
{
return framework::is_initialized()
? const_string( framework::current_test_case().p_name.get() )
- : BOOST_TEST_L( "Test setup" );
+ : NDNBOOST_TEST_L( "Test setup" );
}
} // local namespace
@@ -77,12 +77,12 @@
void
compiler_log_formatter::log_build_info( std::ostream& output )
{
- output << "Platform: " << BOOST_PLATFORM << '\n'
- << "Compiler: " << BOOST_COMPILER << '\n'
- << "STL : " << BOOST_STDLIB << '\n'
- << "Boost : " << BOOST_VERSION/100000 << "."
- << BOOST_VERSION/100 % 1000 << "."
- << BOOST_VERSION % 100 << std::endl;
+ output << "Platform: " << NDNBOOST_PLATFORM << '\n'
+ << "Compiler: " << NDNBOOST_COMPILER << '\n'
+ << "STL : " << NDNBOOST_STDLIB << '\n'
+ << "Boost : " << NDNBOOST_VERSION/100000 << "."
+ << NDNBOOST_VERSION/100 % 1000 << "."
+ << NDNBOOST_VERSION % 100 << std::endl;
}
//____________________________________________________________________________//
@@ -148,21 +148,21 @@
compiler_log_formatter::log_entry_start( std::ostream& output, log_entry_data const& entry_data, log_entry_types let )
{
switch( let ) {
- case BOOST_UTL_ET_INFO:
+ case NDNBOOST_UTL_ET_INFO:
print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
output << "info: ";
break;
- case BOOST_UTL_ET_MESSAGE:
+ case NDNBOOST_UTL_ET_MESSAGE:
break;
- case BOOST_UTL_ET_WARNING:
+ case NDNBOOST_UTL_ET_WARNING:
print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
output << "warning in \"" << test_phase_identifier() << "\": ";
break;
- case BOOST_UTL_ET_ERROR:
+ case NDNBOOST_UTL_ET_ERROR:
print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
output << "error in \"" << test_phase_identifier() << "\": ";
break;
- case BOOST_UTL_ET_FATAL_ERROR:
+ case NDNBOOST_UTL_ET_FATAL_ERROR:
print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
output << "fatal error in \"" << test_phase_identifier() << "\": ";
break;
@@ -219,4 +219,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
+#endif // NDNBOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
diff --git a/include/ndnboost/test/impl/cpp_main.ipp b/include/ndnboost/test/impl/cpp_main.ipp
index 3bacee1..337a781 100644
--- a/include/ndnboost/test/impl/cpp_main.ipp
+++ b/include/ndnboost/test/impl/cpp_main.ipp
@@ -13,8 +13,8 @@
// Description : main function implementation for Program Executon Monitor
// ***************************************************************************
-#ifndef BOOST_TEST_CPP_MAIN_IPP_012205GER
-#define BOOST_TEST_CPP_MAIN_IPP_012205GER
+#ifndef NDNBOOST_TEST_CPP_MAIN_IPP_012205GER
+#define NDNBOOST_TEST_CPP_MAIN_IPP_012205GER
// Boost.Test
#include <ndnboost/test/execution_monitor.hpp>
@@ -34,7 +34,7 @@
//____________________________________________________________________________//
-#ifdef BOOST_NO_STDC_NAMESPACE
+#ifdef NDNBOOST_NO_STDC_NAMESPACE
namespace std { using ::getenv; using ::strerror; }
#endif
@@ -63,13 +63,13 @@
namespace ndnboost {
-int BOOST_TEST_DECL
+int NDNBOOST_TEST_DECL
prg_exec_monitor_main( int (*cpp_main)( int argc, char* argv[] ), int argc, char* argv[] )
{
int result = 0;
try {
- ndnboost::unit_test::const_string p( std::getenv( "BOOST_TEST_CATCH_SYSTEM_ERRORS" ) );
+ ndnboost::unit_test::const_string p( std::getenv( "NDNBOOST_TEST_CATCH_SYSTEM_ERRORS" ) );
::ndnboost::execution_monitor ex_mon;
ex_mon.p_catch_system_errors.value = p != "no";
@@ -103,7 +103,7 @@
// like the clutter. Use an environment variable to avoid command
// line argument modifications; for use in production programs
// that's a no-no in some organizations.
- ::ndnboost::unit_test::const_string p( std::getenv( "BOOST_PRG_MON_CONFIRM" ) );
+ ::ndnboost::unit_test::const_string p( std::getenv( "NDNBOOST_PRG_MON_CONFIRM" ) );
if( p != "no" ) {
std::cerr << std::flush << "no errors detected" << std::endl;
}
@@ -114,7 +114,7 @@
} // namespace ndnboost
-#if !defined(BOOST_TEST_DYN_LINK) && !defined(BOOST_TEST_NO_MAIN)
+#if !defined(NDNBOOST_TEST_DYN_LINK) && !defined(NDNBOOST_TEST_NO_MAIN)
// ************************************************************************** //
// ************** main function for tests using lib ************** //
@@ -122,7 +122,7 @@
int cpp_main( int argc, char* argv[] ); // prototype for user's cpp_main()
-int BOOST_TEST_CALL_DECL
+int NDNBOOST_TEST_CALL_DECL
main( int argc, char* argv[] )
{
return ::ndnboost::prg_exec_monitor_main( &cpp_main, argc, argv );
@@ -130,10 +130,10 @@
//____________________________________________________________________________//
-#endif // !BOOST_TEST_DYN_LINK && !BOOST_TEST_NO_MAIN
+#endif // !NDNBOOST_TEST_DYN_LINK && !NDNBOOST_TEST_NO_MAIN
//____________________________________________________________________________//
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_CPP_MAIN_IPP_012205GER
+#endif // NDNBOOST_TEST_CPP_MAIN_IPP_012205GER
diff --git a/include/ndnboost/test/impl/debug.ipp b/include/ndnboost/test/impl/debug.ipp
index bf23f2e..8233149 100644
--- a/include/ndnboost/test/impl/debug.ipp
+++ b/include/ndnboost/test/impl/debug.ipp
@@ -12,8 +12,8 @@
// Description : debug interfaces implementation
// ***************************************************************************
-#ifndef BOOST_TEST_DEBUG_API_IPP_112006GER
-#define BOOST_TEST_DEBUG_API_IPP_112006GER
+#ifndef NDNBOOST_TEST_DEBUG_API_IPP_112006GER
+#define NDNBOOST_TEST_DEBUG_API_IPP_112006GER
// Boost.Test
#include <ndnboost/test/detail/config.hpp>
@@ -24,9 +24,9 @@
#include <ndnboost/test/debug_config.hpp>
// Implementation on Windows
-#if defined(_WIN32) && !defined(UNDER_CE) && !defined(BOOST_DISABLE_WIN32) // ******* WIN32
+#if defined(_WIN32) && !defined(UNDER_CE) && !defined(NDNBOOST_DISABLE_WIN32) // ******* WIN32
-# define BOOST_WIN32_BASED_DEBUG
+# define NDNBOOST_WIN32_BASED_DEBUG
// SYSTEM API
# include <windows.h>
@@ -35,22 +35,22 @@
# include <cstring>
# if !defined(NDEBUG) && defined(_MSC_VER)
-# define BOOST_MS_CRT_BASED_DEBUG
+# define NDNBOOST_MS_CRT_BASED_DEBUG
# include <crtdbg.h>
# endif
-# if BOOST_WORKAROUND( BOOST_MSVC, <1300)
+# if NDNBOOST_WORKAROUND( NDNBOOST_MSVC, <1300)
# define snprintf _snprintf
# endif
-# ifdef BOOST_NO_STDC_NAMESPACE
+# ifdef NDNBOOST_NO_STDC_NAMESPACE
namespace std { using ::memset; using ::sprintf; }
# endif
#elif defined(unix) || defined(__unix) // ********************* UNIX
-# define BOOST_UNIX_BASED_DEBUG
+# define NDNBOOST_UNIX_BASED_DEBUG
// Boost.Test
#include <ndnboost/test/utils/class_properties.hpp>
@@ -76,33 +76,33 @@
# if defined(sun) || defined(__sun)
-# define BOOST_SUN_BASED_DEBUG
+# define NDNBOOST_SUN_BASED_DEBUG
-# ifndef BOOST_TEST_DBG_LIST
-# define BOOST_TEST_DBG_LIST dbx;gdb
+# ifndef NDNBOOST_TEST_DBG_LIST
+# define NDNBOOST_TEST_DBG_LIST dbx;gdb
# endif
-# define BOOST_TEST_CNL_DBG dbx
-# define BOOST_TEST_GUI_DBG dbx-ddd
+# define NDNBOOST_TEST_CNL_DBG dbx
+# define NDNBOOST_TEST_GUI_DBG dbx-ddd
# include <procfs.h>
# elif defined(linux) || defined(__linux)
-# define BOOST_LINUX_BASED_DEBUG
+# define NDNBOOST_LINUX_BASED_DEBUG
# include <sys/ptrace.h>
-# ifndef BOOST_TEST_STAT_LINE_MAX
-# define BOOST_TEST_STAT_LINE_MAX 500
+# ifndef NDNBOOST_TEST_STAT_LINE_MAX
+# define NDNBOOST_TEST_STAT_LINE_MAX 500
# endif
-# ifndef BOOST_TEST_DBG_LIST
-# define BOOST_TEST_DBG_LIST gdb
+# ifndef NDNBOOST_TEST_DBG_LIST
+# define NDNBOOST_TEST_DBG_LIST gdb
# endif
-# define BOOST_TEST_CNL_DBG gdb
-# define BOOST_TEST_GUI_DBG gdb-xterm
+# define NDNBOOST_TEST_CNL_DBG gdb
+# define NDNBOOST_TEST_GUI_DBG gdb-xterm
# endif
@@ -124,7 +124,7 @@
namespace {
-#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+#if defined(NDNBOOST_WIN32_BASED_DEBUG) // *********************** WIN32
template<typename T>
inline void
@@ -167,7 +167,7 @@
//____________________________________________________________________________//
-#elif defined(BOOST_UNIX_BASED_DEBUG)
+#elif defined(NDNBOOST_UNIX_BASED_DEBUG)
// ************************************************************************** //
// ************** fd_holder ************** //
@@ -208,10 +208,10 @@
const_string m_binary_name;
const_string m_binary_path;
-#if defined(BOOST_SUN_BASED_DEBUG)
+#if defined(NDNBOOST_SUN_BASED_DEBUG)
struct psinfo m_psi;
-#elif defined(BOOST_LINUX_BASED_DEBUG)
- char m_stat_line[BOOST_TEST_STAT_LINE_MAX+1];
+#elif defined(NDNBOOST_LINUX_BASED_DEBUG)
+ char m_stat_line[NDNBOOST_TEST_STAT_LINE_MAX+1];
#endif
char m_binary_path_buff[500+1]; // !! ??
};
@@ -221,7 +221,7 @@
process_info::process_info( int pid )
: m_parent_pid( 0 )
{
-#if defined(BOOST_SUN_BASED_DEBUG)
+#if defined(NDNBOOST_SUN_BASED_DEBUG)
char fname_buff[30];
::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/psinfo", pid );
@@ -255,7 +255,7 @@
m_binary_path.assign( m_binary_path_buff );
-#elif defined(BOOST_LINUX_BASED_DEBUG)
+#elif defined(NDNBOOST_LINUX_BASED_DEBUG)
char fname_buff[30];
::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/stat", pid );
@@ -607,8 +607,8 @@
info_t::info_t()
{
p_dbg.value = ::getenv( "DISPLAY" )
- ? std::string( BOOST_STRINGIZE( BOOST_TEST_GUI_DBG ) )
- : std::string( BOOST_STRINGIZE( BOOST_TEST_CNL_DBG ) );
+ ? std::string( NDNBOOST_STRINGIZE( NDNBOOST_TEST_GUI_DBG ) )
+ : std::string( NDNBOOST_STRINGIZE( NDNBOOST_TEST_CNL_DBG ) );
m_dbg_starter_reg[std::string("gdb")] = &start_gdb_in_console;
m_dbg_starter_reg[std::string("gdb-emacs")] = &start_gdb_in_emacs;
@@ -635,14 +635,14 @@
bool
under_debugger()
{
-#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+#if defined(NDNBOOST_WIN32_BASED_DEBUG) // *********************** WIN32
return !!s_info.m_is_debugger_present && s_info.m_is_debugger_present();
-#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
+#elif defined(NDNBOOST_UNIX_BASED_DEBUG) // ********************** UNIX
// !! ?? could/should we cache the result somehow?
- const_string dbg_list = BOOST_TEST_STRINGIZE( BOOST_TEST_DBG_LIST );
+ const_string dbg_list = NDNBOOST_TEST_STRINGIZE( NDNBOOST_TEST_DBG_LIST );
pid_t pid = ::getpid();
@@ -677,21 +677,21 @@
{
// !! ?? auto-start debugger?
-#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+#if defined(NDNBOOST_WIN32_BASED_DEBUG) // *********************** WIN32
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1300) || \
- BOOST_WORKAROUND(__GNUC__, >= 3) && !defined(__MINGW32__) || \
+#if NDNBOOST_WORKAROUND(NDNBOOST_MSVC, >= 1300) || \
+ NDNBOOST_WORKAROUND(__GNUC__, >= 3) && !defined(__MINGW32__) || \
defined(__INTEL_COMPILER)
-# define BOOST_DEBUG_BREAK __debugbreak
+# define NDNBOOST_DEBUG_BREAK __debugbreak
#else
-# define BOOST_DEBUG_BREAK DebugBreak
+# define NDNBOOST_DEBUG_BREAK DebugBreak
#endif
#ifndef __MINGW32__
if( !under_debugger() ) {
__try {
__try {
- BOOST_DEBUG_BREAK();
+ NDNBOOST_DEBUG_BREAK();
}
__except( UnhandledExceptionFilter(GetExceptionInformation()) )
{
@@ -702,14 +702,14 @@
__except (EXCEPTION_EXECUTE_HANDLER)
{
// If we got here, the user has pushed Debug. Debugger is already attached to our process and we
- // continue to let the another BOOST_DEBUG_BREAK to be called.
+ // continue to let the another NDNBOOST_DEBUG_BREAK to be called.
}
}
#endif
- BOOST_DEBUG_BREAK();
+ NDNBOOST_DEBUG_BREAK();
-#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
+#elif defined(NDNBOOST_UNIX_BASED_DEBUG) // ********************** UNIX
::kill( ::getpid(), SIGTRAP );
@@ -724,7 +724,7 @@
// ************** console debugger setup ************** //
// ************************************************************************** //
-#if defined(BOOST_UNIX_BASED_DEBUG) // ************************ UNIX
+#if defined(NDNBOOST_UNIX_BASED_DEBUG) // ************************ UNIX
std::string
set_debugger( unit_test::const_string dbg_id, dbg_starter s )
@@ -761,7 +761,7 @@
if( under_debugger() )
return false;
-#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+#if defined(NDNBOOST_WIN32_BASED_DEBUG) // *********************** WIN32
const int MAX_CMD_LINE = 200;
@@ -857,7 +857,7 @@
return true;
-#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
+#elif defined(NDNBOOST_UNIX_BASED_DEBUG) // ********************** UNIX
char init_done_lock_fn[] = "/tmp/btl_dbg_init_done_XXXXXX";
fd_holder init_done_lock_fd( ::mkstemp( init_done_lock_fn ) );
@@ -926,7 +926,7 @@
{
unit_test::ut_detail::ignore_unused_variable_warning( on_off );
-#ifdef BOOST_MS_CRT_BASED_DEBUG
+#ifdef NDNBOOST_MS_CRT_BASED_DEBUG
int flags = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG );
if( !on_off )
@@ -938,7 +938,7 @@
}
_CrtSetDbgFlag ( flags );
-#endif // BOOST_MS_CRT_BASED_DEBUG
+#endif // NDNBOOST_MS_CRT_BASED_DEBUG
}
//____________________________________________________________________________//
@@ -953,9 +953,9 @@
{
unit_test::ut_detail::ignore_unused_variable_warning( mem_alloc_order_num );
-#ifdef BOOST_MS_CRT_BASED_DEBUG
+#ifdef NDNBOOST_MS_CRT_BASED_DEBUG
_CrtSetBreakAlloc( mem_alloc_order_num );
-#endif // BOOST_MS_CRT_BASED_DEBUG
+#endif // NDNBOOST_MS_CRT_BASED_DEBUG
}
} // namespace debug
@@ -966,5 +966,5 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_DEBUG_API_IPP_112006GER
+#endif // NDNBOOST_TEST_DEBUG_API_IPP_112006GER
diff --git a/include/ndnboost/test/impl/exception_safety.ipp b/include/ndnboost/test/impl/exception_safety.ipp
index c3680a9..1c36385 100644
--- a/include/ndnboost/test/impl/exception_safety.ipp
+++ b/include/ndnboost/test/impl/exception_safety.ipp
@@ -12,13 +12,13 @@
// Description : Facilities to perform exception safety tests
// ***************************************************************************
-#ifndef BOOST_TEST_EXECUTION_SAFETY_IPP_112005GER
-#define BOOST_TEST_EXECUTION_SAFETY_IPP_112005GER
+#ifndef NDNBOOST_TEST_EXECUTION_SAFETY_IPP_112005GER
+#define NDNBOOST_TEST_EXECUTION_SAFETY_IPP_112005GER
// Boost.Test
#include <ndnboost/test/detail/config.hpp>
-#if BOOST_TEST_SUPPORT_INTERACTION_TESTING
+#if NDNBOOST_TEST_SUPPORT_INTERACTION_TESTING
#include <ndnboost/test/detail/global_typedef.hpp>
#include <ndnboost/test/detail/unit_test_parameters.hpp>
@@ -245,7 +245,7 @@
}
}
- BOOST_TEST_MESSAGE( "Total tested " << --m_exec_path_counter << " execution path" );
+ NDNBOOST_TEST_MESSAGE( "Total tested " << --m_exec_path_counter << " execution path" );
return false;
}
@@ -277,7 +277,7 @@
activity_guard ag( m_internal_activity );
if( m_exec_path_point < m_execution_path.size() ) {
- BOOST_REQUIRE_MESSAGE( m_execution_path[m_exec_path_point].m_type == EPP_DECISION &&
+ NDNBOOST_REQUIRE_MESSAGE( m_execution_path[m_exec_path_point].m_type == EPP_DECISION &&
m_execution_path[m_exec_path_point].m_file_name == file &&
m_execution_path[m_exec_path_point].m_line_num == line_num,
"Function under test exibit non-deterministic behavior" );
@@ -301,7 +301,7 @@
activity_guard ag( m_internal_activity );
if( m_exec_path_point < m_execution_path.size() ) {
- BOOST_REQUIRE_MESSAGE( m_execution_path[m_exec_path_point].m_type == EPP_SCOPE &&
+ NDNBOOST_REQUIRE_MESSAGE( m_execution_path[m_exec_path_point].m_type == EPP_SCOPE &&
m_execution_path[m_exec_path_point].m_file_name == file &&
m_execution_path[m_exec_path_point].m_line_num == line_num,
"Function under test exibit non-deterministic behavior" );
@@ -324,7 +324,7 @@
{
activity_guard ag( m_internal_activity );
- BOOST_REQUIRE_MESSAGE( m_execution_path[enter_scope_point].m_type == EPP_SCOPE,
+ NDNBOOST_REQUIRE_MESSAGE( m_execution_path[enter_scope_point].m_type == EPP_SCOPE,
"Function under test exibit non-deterministic behavior" );
m_execution_path[enter_scope_point].m_scope.size = m_exec_path_point - enter_scope_point;
@@ -341,7 +341,7 @@
activity_guard ag( m_internal_activity );
if( m_exec_path_point < m_execution_path.size() )
- BOOST_REQUIRE_MESSAGE( m_execution_path[m_exec_path_point].m_type == EPP_ALLOC,
+ NDNBOOST_REQUIRE_MESSAGE( m_execution_path[m_exec_path_point].m_type == EPP_ALLOC,
"Function under test exibit non-deterministic behavior" );
else
m_execution_path.push_back(
@@ -508,7 +508,7 @@
// ************** exception safety test ************** //
// ************************************************************************** //
-void BOOST_TEST_DECL
+void NDNBOOST_TEST_DECL
exception_safety( callback0<> const& F, const_string test_name )
{
exception_safety_tester est( test_name );
@@ -534,4 +534,4 @@
#endif // non-ancient compiler
-#endif // BOOST_TEST_EXECUTION_SAFETY_IPP_112005GER
+#endif // NDNBOOST_TEST_EXECUTION_SAFETY_IPP_112005GER
diff --git a/include/ndnboost/test/impl/execution_monitor.ipp b/include/ndnboost/test/impl/execution_monitor.ipp
index 5337347..715993f 100644
--- a/include/ndnboost/test/impl/execution_monitor.ipp
+++ b/include/ndnboost/test/impl/execution_monitor.ipp
@@ -21,8 +21,8 @@
// boost libraries.
// ***************************************************************************
-#ifndef BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
-#define BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
+#ifndef NDNBOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
+#define NDNBOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
// Boost.Test
#include <ndnboost/test/detail/config.hpp>
@@ -48,7 +48,7 @@
#include <cstdio> // for vsnprintf
#include <cstdarg> // for varargs
-#ifdef BOOST_NO_STDC_NAMESPACE
+#ifdef NDNBOOST_NO_STDC_NAMESPACE
namespace std { using ::strerror; using ::strlen; using ::strncat; }
#endif
@@ -64,11 +64,11 @@
# include <stdio.h>
#endif
-#if defined(_WIN32) && !defined(BOOST_DISABLE_WIN32) && \
+#if defined(_WIN32) && !defined(NDNBOOST_DISABLE_WIN32) && \
(!defined(__COMO__) && !defined(__MWERKS__) && !defined(__GNUC__) || \
- BOOST_WORKAROUND(__MWERKS__, >= 0x3000))
+ NDNBOOST_WORKAROUND(__MWERKS__, >= 0x3000))
-# define BOOST_SEH_BASED_SIGNAL_HANDLING
+# define NDNBOOST_SEH_BASED_SIGNAL_HANDLING
# include <windows.h>
@@ -84,7 +84,7 @@
typedef unsigned uintptr_t;
# endif
-# if BOOST_WORKAROUND(_MSC_VER, < 1300 ) || defined(UNDER_CE)
+# if NDNBOOST_WORKAROUND(_MSC_VER, < 1300 ) || defined(UNDER_CE)
typedef void* uintptr_t;
# endif
@@ -117,18 +117,18 @@
# if !defined(NDEBUG) && defined(_MSC_VER) && !defined(UNDER_CE)
# include <crtdbg.h>
-# define BOOST_TEST_CRT_HOOK_TYPE _CRT_REPORT_HOOK
-# define BOOST_TEST_CRT_ASSERT _CRT_ASSERT
-# define BOOST_TEST_CRT_ERROR _CRT_ERROR
-# define BOOST_TEST_CRT_SET_HOOK(H) _CrtSetReportHook(H)
+# define NDNBOOST_TEST_CRT_HOOK_TYPE _CRT_REPORT_HOOK
+# define NDNBOOST_TEST_CRT_ASSERT _CRT_ASSERT
+# define NDNBOOST_TEST_CRT_ERROR _CRT_ERROR
+# define NDNBOOST_TEST_CRT_SET_HOOK(H) _CrtSetReportHook(H)
# else
-# define BOOST_TEST_CRT_HOOK_TYPE void*
-# define BOOST_TEST_CRT_ASSERT 2
-# define BOOST_TEST_CRT_ERROR 1
-# define BOOST_TEST_CRT_SET_HOOK(H) (void*)(H)
+# define NDNBOOST_TEST_CRT_HOOK_TYPE void*
+# define NDNBOOST_TEST_CRT_ASSERT 2
+# define NDNBOOST_TEST_CRT_ERROR 1
+# define NDNBOOST_TEST_CRT_SET_HOOK(H) (void*)(H)
# endif
-# if !BOOST_WORKAROUND(_MSC_VER, >= 1400 ) || defined(UNDER_CE)
+# if !NDNBOOST_WORKAROUND(_MSC_VER, >= 1400 ) || defined(UNDER_CE)
typedef void* _invalid_parameter_handler;
@@ -140,15 +140,15 @@
# endif
-# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564)) || defined(UNDER_CE)
+# if NDNBOOST_WORKAROUND(__BORLANDC__, NDNBOOST_TESTED_AT(0x0564)) || defined(UNDER_CE)
namespace { void _set_se_translator( void* ) {} }
# endif
-#elif defined(BOOST_HAS_SIGACTION)
+#elif defined(NDNBOOST_HAS_SIGACTION)
-# define BOOST_SIGACTION_BASED_SIGNAL_HANDLING
+# define NDNBOOST_SIGACTION_BASED_SIGNAL_HANDLING
# include <unistd.h>
# include <signal.h>
@@ -167,30 +167,30 @@
# define ILL_ILLOPN 2 // ILL_RESOP_FAULT
# define ILL_COPROC ILL_FPOP_FAULT
-# define BOOST_TEST_LIMITED_SIGNAL_DETAILS
-# define BOOST_TEST_IGNORE_SIGCHLD
+# define NDNBOOST_TEST_LIMITED_SIGNAL_DETAILS
+# define NDNBOOST_TEST_IGNORE_SIGCHLD
# endif
# endif
# if !defined(__CYGWIN__) && !defined(__QNXNTO__)
-# define BOOST_TEST_USE_ALT_STACK
+# define NDNBOOST_TEST_USE_ALT_STACK
# endif
# if defined(SIGPOLL) && !defined(__CYGWIN__) && \
!(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && \
!defined(__NetBSD__) && \
!defined(__QNXNTO__)
-# define BOOST_TEST_CATCH_SIGPOLL
+# define NDNBOOST_TEST_CATCH_SIGPOLL
# endif
-# ifdef BOOST_TEST_USE_ALT_STACK
-# define BOOST_TEST_ALT_STACK_SIZE SIGSTKSZ
+# ifdef NDNBOOST_TEST_USE_ALT_STACK
+# define NDNBOOST_TEST_ALT_STACK_SIZE SIGSTKSZ
# endif
#else
-# define BOOST_NO_SIGNAL_HANDLING
+# define NDNBOOST_NO_SIGNAL_HANDLING
#endif
@@ -211,13 +211,13 @@
namespace detail {
#ifdef __BORLANDC__
-# define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) std::vsnprintf( (a1), (a2), (a3), (a4) )
-#elif BOOST_WORKAROUND(_MSC_VER, <= 1310) || \
- BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3000)) || \
+# define NDNBOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) std::vsnprintf( (a1), (a2), (a3), (a4) )
+#elif NDNBOOST_WORKAROUND(_MSC_VER, <= 1310) || \
+ NDNBOOST_WORKAROUND(__MWERKS__, NDNBOOST_TESTED_AT(0x3000)) || \
defined(UNDER_CE)
-# define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) _vsnprintf( (a1), (a2), (a3), (a4) )
+# define NDNBOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) _vsnprintf( (a1), (a2), (a3), (a4) )
#else
-# define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) vsnprintf( (a1), (a2), (a3), (a4) )
+# define NDNBOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) vsnprintf( (a1), (a2), (a3), (a4) )
#endif
template <typename ErrorInfo>
@@ -240,7 +240,7 @@
static const int REPORT_ERROR_BUFFER_SIZE = 512;
static char buf[REPORT_ERROR_BUFFER_SIZE];
- BOOST_TEST_VSNPRINTF( buf, sizeof(buf)-1, format, *args );
+ NDNBOOST_TEST_VSNPRINTF( buf, sizeof(buf)-1, format, *args );
buf[sizeof(buf)-1] = 0;
va_end( *args );
@@ -285,7 +285,7 @@
} // namespace detail
-#if defined(BOOST_SIGACTION_BASED_SIGNAL_HANDLING)
+#if defined(NDNBOOST_SIGACTION_BASED_SIGNAL_HANDLING)
// ************************************************************************** //
// ************** Sigaction based signal handling ************** //
@@ -356,7 +356,7 @@
switch( m_sig_info->si_signo ) {
case SIGILL:
switch( m_sig_info->si_code ) {
-#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+#ifndef NDNBOOST_TEST_LIMITED_SIGNAL_DETAILS
case ILL_ILLOPC:
report_error( execution_exception::system_fatal_error,
"signal: illegal opcode; address of failing instruction: 0x%08lx",
@@ -458,7 +458,7 @@
case SIGSEGV:
switch( m_sig_info->si_code ) {
-#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+#ifndef NDNBOOST_TEST_LIMITED_SIGNAL_DETAILS
case SEGV_MAPERR:
report_error( execution_exception::system_fatal_error,
"memory access violation at address: 0x%08lx: no mapping at fault address",
@@ -480,7 +480,7 @@
case SIGBUS:
switch( m_sig_info->si_code ) {
-#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+#ifndef NDNBOOST_TEST_LIMITED_SIGNAL_DETAILS
case BUS_ADRALN:
report_error( execution_exception::system_fatal_error,
"memory access violation at address: 0x%08lx: invalid address alignment",
@@ -507,7 +507,7 @@
case SIGCHLD:
switch( m_sig_info->si_code ) {
-#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+#ifndef NDNBOOST_TEST_LIMITED_SIGNAL_DETAILS
case CLD_EXITED:
report_error( execution_exception::system_error,
"child has exited; pid: %d; uid: %d; exit value: %d",
@@ -547,11 +547,11 @@
}
break;
-#if defined(BOOST_TEST_CATCH_SIGPOLL)
+#if defined(NDNBOOST_TEST_CATCH_SIGPOLL)
case SIGPOLL:
switch( m_sig_info->si_code ) {
-#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+#ifndef NDNBOOST_TEST_LIMITED_SIGNAL_DETAILS
case POLL_IN:
report_error( execution_exception::system_error,
"data input available; band event %d",
@@ -655,7 +655,7 @@
std::memset( &m_new_action, 0, sizeof(struct sigaction) );
- BOOST_TEST_SYS_ASSERT( ::sigaction( m_sig , sigaction_ptr(), &m_new_action ) != -1 );
+ NDNBOOST_TEST_SYS_ASSERT( ::sigaction( m_sig , sigaction_ptr(), &m_new_action ) != -1 );
if( m_new_action.sa_sigaction || m_new_action.sa_handler ) {
m_installed = false;
@@ -665,14 +665,14 @@
m_new_action.sa_flags |= SA_SIGINFO;
m_new_action.sa_sigaction = attach_dbg ? &execution_monitor_attaching_signal_handler
: &execution_monitor_jumping_signal_handler;
- BOOST_TEST_SYS_ASSERT( sigemptyset( &m_new_action.sa_mask ) != -1 );
+ NDNBOOST_TEST_SYS_ASSERT( sigemptyset( &m_new_action.sa_mask ) != -1 );
-#ifdef BOOST_TEST_USE_ALT_STACK
+#ifdef NDNBOOST_TEST_USE_ALT_STACK
if( alt_stack )
m_new_action.sa_flags |= SA_ONSTACK;
#endif
- BOOST_TEST_SYS_ASSERT( ::sigaction( m_sig, &m_new_action, &m_old_action ) != -1 );
+ NDNBOOST_TEST_SYS_ASSERT( ::sigaction( m_sig, &m_new_action, &m_old_action ) != -1 );
}
//____________________________________________________________________________//
@@ -745,10 +745,10 @@
, m_FPE_action ( SIGFPE , catch_system_errors, attach_dbg, alt_stack )
, m_SEGV_action( SIGSEGV, catch_system_errors, attach_dbg, alt_stack )
, m_BUS_action ( SIGBUS , catch_system_errors, attach_dbg, alt_stack )
-#ifndef BOOST_TEST_IGNORE_SIGCHLD
+#ifndef NDNBOOST_TEST_IGNORE_SIGCHLD
, m_CHLD_action( SIGCHLD, catch_system_errors, attach_dbg, alt_stack )
#endif
-#ifdef BOOST_TEST_CATCH_SIGPOLL
+#ifdef NDNBOOST_TEST_CATCH_SIGPOLL
, m_POLL_action( SIGPOLL, catch_system_errors, attach_dbg, alt_stack )
#endif
, m_ABRT_action( SIGABRT, catch_system_errors, attach_dbg, alt_stack )
@@ -761,18 +761,18 @@
::alarm( timeout );
}
-#ifdef BOOST_TEST_USE_ALT_STACK
+#ifdef NDNBOOST_TEST_USE_ALT_STACK
if( alt_stack ) {
stack_t sigstk;
std::memset( &sigstk, 0, sizeof(stack_t) );
- BOOST_TEST_SYS_ASSERT( ::sigaltstack( 0, &sigstk ) != -1 );
+ NDNBOOST_TEST_SYS_ASSERT( ::sigaltstack( 0, &sigstk ) != -1 );
if( sigstk.ss_flags & SS_DISABLE ) {
sigstk.ss_sp = alt_stack;
- sigstk.ss_size = BOOST_TEST_ALT_STACK_SIZE;
+ sigstk.ss_size = NDNBOOST_TEST_ALT_STACK_SIZE;
sigstk.ss_flags = 0;
- BOOST_TEST_SYS_ASSERT( ::sigaltstack( &sigstk, 0 ) != -1 );
+ NDNBOOST_TEST_SYS_ASSERT( ::sigaltstack( &sigstk, 0 ) != -1 );
}
}
#endif
@@ -787,7 +787,7 @@
if( m_timeout > 0 )
::alarm( 0 );
-#ifdef BOOST_TEST_USE_ALT_STACK
+#ifdef NDNBOOST_TEST_USE_ALT_STACK
#ifdef __GNUC__
// We shouldn't need to explicitly initialize all the members here,
// but gcc warns if we don't, so add initializers for each of the
@@ -799,7 +799,7 @@
sigstk.ss_size = MINSIGSTKSZ;
sigstk.ss_flags = SS_DISABLE;
- BOOST_TEST_SYS_ASSERT( ::sigaltstack( &sigstk, 0 ) != -1 );
+ NDNBOOST_TEST_SYS_ASSERT( ::sigaltstack( &sigstk, 0 ) != -1 );
#endif
s_active_handler = m_prev_handler;
@@ -816,10 +816,10 @@
static bool ignore_sigchild( siginfo_t* info )
{
return info->si_signo == SIGCHLD
-#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+#ifndef NDNBOOST_TEST_LIMITED_SIGNAL_DETAILS
&& info->si_code == CLD_EXITED
#endif
-#ifdef BOOST_TEST_IGNORE_NON_ZERO_CHILD_CODE
+#ifdef NDNBOOST_TEST_IGNORE_NON_ZERO_CHILD_CODE
;
#else
&& (int)info->si_status == 0;
@@ -849,7 +849,7 @@
execution_monitor_jumping_signal_handler( sig, info, context );
// debugger attached; it will handle the signal
- BOOST_TEST_SYS_ASSERT( ::signal( sig, SIG_DFL ) != SIG_ERR );
+ NDNBOOST_TEST_SYS_ASSERT( ::signal( sig, SIG_DFL ) != SIG_ERR );
}
//____________________________________________________________________________//
@@ -871,9 +871,9 @@
p_catch_system_errors.value = false;
#endif
-#ifdef BOOST_TEST_USE_ALT_STACK
+#ifdef NDNBOOST_TEST_USE_ALT_STACK
if( !!p_use_alt_stack && !m_alt_stack )
- m_alt_stack.reset( new char[BOOST_TEST_ALT_STACK_SIZE] );
+ m_alt_stack.reset( new char[NDNBOOST_TEST_ALT_STACK_SIZE] );
#else
p_use_alt_stack.value = false;
#endif
@@ -889,13 +889,13 @@
//____________________________________________________________________________//
-#elif defined(BOOST_SEH_BASED_SIGNAL_HANDLING)
+#elif defined(NDNBOOST_SEH_BASED_SIGNAL_HANDLING)
// ************************************************************************** //
// ************** Microsoft structured exception handling ************** //
// ************************************************************************** //
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564))
+#if NDNBOOST_WORKAROUND(__BORLANDC__, NDNBOOST_TESTED_AT(0x0564))
namespace { void _set_se_translator( void* ) {} }
#endif
@@ -1068,15 +1068,15 @@
// ************** assert_reporting_function ************** //
// ************************************************************************** //
-int BOOST_TEST_CALL_DECL
+int NDNBOOST_TEST_CALL_DECL
assert_reporting_function( int reportType, char* userMessage, int* )
{
switch( reportType ) {
- case BOOST_TEST_CRT_ASSERT:
+ case NDNBOOST_TEST_CRT_ASSERT:
detail::report_error( execution_exception::user_error, userMessage );
return 1; // return value and retVal are not important since we never reach this line
- case BOOST_TEST_CRT_ERROR:
+ case NDNBOOST_TEST_CRT_ERROR:
detail::report_error( execution_exception::system_error, userMessage );
return 1; // return value and retVal are not important since we never reach this line
@@ -1087,7 +1087,7 @@
//____________________________________________________________________________//
-void BOOST_TEST_CALL_DECL
+void NDNBOOST_TEST_CALL_DECL
invalid_param_handler( wchar_t const* /* expr */,
wchar_t const* /* func */,
wchar_t const* /* file */,
@@ -1100,7 +1100,7 @@
//____________________________________________________________________________//
-void BOOST_TEST_CALL_DECL
+void NDNBOOST_TEST_CALL_DECL
switch_fp_exceptions( bool on_off )
{
if( !on_off )
@@ -1134,7 +1134,7 @@
execution_monitor::catch_signals( unit_test::callback0<int> const& F )
{
_invalid_parameter_handler old_iph = _invalid_parameter_handler();
- BOOST_TEST_CRT_HOOK_TYPE old_crt_hook = 0;
+ NDNBOOST_TEST_CRT_HOOK_TYPE old_crt_hook = 0;
if( !p_catch_system_errors )
_set_se_translator( &detail::seh_catch_preventer );
@@ -1142,7 +1142,7 @@
if( !!p_detect_fp_exceptions )
detail::switch_fp_exceptions( true );
- old_crt_hook = BOOST_TEST_CRT_SET_HOOK( &detail::assert_reporting_function );
+ old_crt_hook = NDNBOOST_TEST_CRT_SET_HOOK( &detail::assert_reporting_function );
old_iph = _set_invalid_parameter_handler(
reinterpret_cast<_invalid_parameter_handler>( &detail::invalid_param_handler ) );
@@ -1165,7 +1165,7 @@
if( !!p_detect_fp_exceptions )
detail::switch_fp_exceptions( false );
- BOOST_TEST_CRT_SET_HOOK( old_crt_hook );
+ NDNBOOST_TEST_CRT_SET_HOOK( old_crt_hook );
_set_invalid_parameter_handler( old_iph );
}
@@ -1230,7 +1230,7 @@
current_exception_cast<ndnboost::exception const>(),
"std::bad_alloc: %s", ex.what() ); }
-#if BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
+#if NDNBOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
catch( std::bad_cast const& ex )
{ detail::report_error( execution_exception::cpp_exception_error,
current_exception_cast<ndnboost::exception const>(),
@@ -1345,7 +1345,7 @@
execution_exception::execution_exception( error_code ec_, const_string what_msg_, location const& location_ )
: m_error_code( ec_ )
-, m_what( what_msg_.empty() ? BOOST_TEST_L( "uncaught exception, system error or abort requested" ) : what_msg_ )
+, m_what( what_msg_.empty() ? NDNBOOST_TEST_L( "uncaught exception, system error or abort requested" ) : what_msg_ )
, m_location( location_ )
{}
@@ -1363,5 +1363,5 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
+#endif // NDNBOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
diff --git a/include/ndnboost/test/impl/framework.ipp b/include/ndnboost/test/impl/framework.ipp
index cdbce24..2da90c6 100644
--- a/include/ndnboost/test/impl/framework.ipp
+++ b/include/ndnboost/test/impl/framework.ipp
@@ -12,8 +12,8 @@
// Description : implements framework API - main driver for the test
// ***************************************************************************
-#ifndef BOOST_TEST_FRAMEWORK_IPP_021005GER
-#define BOOST_TEST_FRAMEWORK_IPP_021005GER
+#ifndef NDNBOOST_TEST_FRAMEWORK_IPP_021005GER
+#define NDNBOOST_TEST_FRAMEWORK_IPP_021005GER
// Boost.Test
#include <ndnboost/test/framework.hpp>
@@ -42,7 +42,7 @@
#include <cstdlib>
#include <ctime>
-#ifdef BOOST_NO_STDC_NAMESPACE
+#ifdef NDNBOOST_NO_STDC_NAMESPACE
namespace std { using ::time; using ::srand; }
#endif
@@ -86,7 +86,7 @@
{}
int operator()()
{
-#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+#ifdef NDNBOOST_TEST_ALTERNATIVE_INIT_API
if( !(*m_init_func)() )
throw std::runtime_error( "test module initialization failed" );
#else
@@ -141,13 +141,13 @@
void visit( test_case const& tc )
{
if( !tc.check_dependencies() ) {
- BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+ NDNBOOST_TEST_FOREACH( test_observer*, to, m_observers )
to->test_unit_skipped( tc );
return;
}
- BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+ NDNBOOST_TEST_FOREACH( test_observer*, to, m_observers )
to->test_unit_start( tc );
ndnboost::timer tc_timer;
@@ -158,11 +158,11 @@
unsigned long elapsed = static_cast<unsigned long>( tc_timer.elapsed() * 1e6 );
if( unit_test_monitor.is_critical_error( run_result ) ) {
- BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+ NDNBOOST_TEST_FOREACH( test_observer*, to, m_observers )
to->test_aborted();
}
- BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+ NDNBOOST_TEST_FOREACH( test_observer*, to, m_observers )
to->test_unit_finish( tc, elapsed );
m_curr_test_case = bkup;
@@ -174,13 +174,13 @@
bool test_suite_start( test_suite const& ts )
{
if( !ts.check_dependencies() ) {
- BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+ NDNBOOST_TEST_FOREACH( test_observer*, to, m_observers )
to->test_unit_skipped( ts );
return false;
}
- BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+ NDNBOOST_TEST_FOREACH( test_observer*, to, m_observers )
to->test_unit_start( ts );
return true;
@@ -188,7 +188,7 @@
void test_suite_finish( test_suite const& ts )
{
- BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+ NDNBOOST_TEST_FOREACH( test_observer*, to, m_observers )
to->test_unit_finish( ts, 0 );
}
@@ -287,11 +287,11 @@
void
register_test_unit( test_case* tc )
{
- BOOST_TEST_SETUP_ASSERT( tc->p_id == INV_TEST_UNIT_ID, BOOST_TEST_L( "test case already registered" ) );
+ NDNBOOST_TEST_SETUP_ASSERT( tc->p_id == INV_TEST_UNIT_ID, NDNBOOST_TEST_L( "test case already registered" ) );
test_unit_id new_id = s_frk_impl().m_next_test_case_id;
- BOOST_TEST_SETUP_ASSERT( new_id != MAX_TEST_CASE_ID, BOOST_TEST_L( "too many test cases" ) );
+ NDNBOOST_TEST_SETUP_ASSERT( new_id != MAX_TEST_CASE_ID, NDNBOOST_TEST_L( "too many test cases" ) );
typedef framework_impl::test_unit_store::value_type map_value_type;
@@ -306,11 +306,11 @@
void
register_test_unit( test_suite* ts )
{
- BOOST_TEST_SETUP_ASSERT( ts->p_id == INV_TEST_UNIT_ID, BOOST_TEST_L( "test suite already registered" ) );
+ NDNBOOST_TEST_SETUP_ASSERT( ts->p_id == INV_TEST_UNIT_ID, NDNBOOST_TEST_L( "test suite already registered" ) );
test_unit_id new_id = s_frk_impl().m_next_test_suite_id;
- BOOST_TEST_SETUP_ASSERT( new_id != MAX_TEST_SUITE_ID, BOOST_TEST_L( "too many test suites" ) );
+ NDNBOOST_TEST_SETUP_ASSERT( new_id != MAX_TEST_SUITE_ID, NDNBOOST_TEST_L( "too many test suites" ) );
typedef framework_impl::test_unit_store::value_type map_value_type;
s_frk_impl().m_test_units.insert( map_value_type( new_id, ts ) );
@@ -402,9 +402,9 @@
test_case_counter tcc;
traverse_test_tree( id, tcc );
- BOOST_TEST_SETUP_ASSERT( tcc.p_count != 0 , runtime_config::test_to_run().is_empty()
- ? BOOST_TEST_L( "test tree is empty" )
- : BOOST_TEST_L( "no test cases matching filter" ) );
+ NDNBOOST_TEST_SETUP_ASSERT( tcc.p_count != 0 , runtime_config::test_to_run().is_empty()
+ ? NDNBOOST_TEST_L( "test tree is empty" )
+ : NDNBOOST_TEST_L( "no test cases matching filter" ) );
bool call_start_finish = !continue_test || !s_frk_impl().m_test_in_progress;
bool was_in_progress = s_frk_impl().m_test_in_progress;
@@ -412,7 +412,7 @@
s_frk_impl().m_test_in_progress = true;
if( call_start_finish ) {
- BOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers ) {
+ NDNBOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers ) {
ndnboost::execution_monitor em;
try {
@@ -429,12 +429,12 @@
break;
case 1: {
unsigned int seed = static_cast<unsigned int>( std::time( 0 ) );
- BOOST_TEST_MESSAGE( "Test cases order is shuffled using seed: " << seed );
+ NDNBOOST_TEST_MESSAGE( "Test cases order is shuffled using seed: " << seed );
std::srand( seed );
break;
}
default:
- BOOST_TEST_MESSAGE( "Test cases order is shuffled using seed: " << runtime_config::random_seed() );
+ NDNBOOST_TEST_MESSAGE( "Test cases order is shuffled using seed: " << runtime_config::random_seed() );
std::srand( runtime_config::random_seed() );
}
@@ -446,7 +446,7 @@
}
if( call_start_finish ) {
- BOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
+ NDNBOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
to->test_finish();
}
@@ -466,7 +466,7 @@
void
assertion_result( bool passed )
{
- BOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
+ NDNBOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
to->assertion_result( passed );
}
@@ -475,7 +475,7 @@
void
exception_caught( execution_exception const& ex )
{
- BOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
+ NDNBOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
to->exception_caught( ex );
}
@@ -484,7 +484,7 @@
void
test_unit_aborted( test_unit const& tu )
{
- BOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
+ NDNBOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
to->test_unit_aborted( tu );
}
@@ -500,4 +500,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_FRAMEWORK_IPP_021005GER
+#endif // NDNBOOST_TEST_FRAMEWORK_IPP_021005GER
diff --git a/include/ndnboost/test/impl/interaction_based.ipp b/include/ndnboost/test/impl/interaction_based.ipp
index 03ee9be..2d12fae 100644
--- a/include/ndnboost/test/impl/interaction_based.ipp
+++ b/include/ndnboost/test/impl/interaction_based.ipp
@@ -12,13 +12,13 @@
// Description : Facilities to perform interaction-based testing
// ***************************************************************************
-#ifndef BOOST_TEST_INTERACTION_BASED_IPP_112105GER
-#define BOOST_TEST_INTERACTION_BASED_IPP_112105GER
+#ifndef NDNBOOST_TEST_INTERACTION_BASED_IPP_112105GER
+#define NDNBOOST_TEST_INTERACTION_BASED_IPP_112105GER
// Boost.Test
#include <ndnboost/test/detail/config.hpp>
-#if BOOST_TEST_SUPPORT_INTERACTION_TESTING
+#if NDNBOOST_TEST_SUPPORT_INTERACTION_TESTING
// Boost.Test
#include <ndnboost/test/detail/config.hpp>
@@ -66,7 +66,7 @@
if( reset ) {
if( new_ptr ) {
- BOOST_TEST_SETUP_ASSERT( ptr == &dummy, BOOST_TEST_L( "Can't run two interation based test the same time" ) );
+ NDNBOOST_TEST_SETUP_ASSERT( ptr == &dummy, NDNBOOST_TEST_L( "Can't run two interation based test the same time" ) );
ptr = new_ptr;
}
@@ -87,4 +87,4 @@
#endif // not ancient compiler
-#endif // BOOST_TEST_INTERACTION_BASED_IPP_112105GER
+#endif // NDNBOOST_TEST_INTERACTION_BASED_IPP_112105GER
diff --git a/include/ndnboost/test/impl/logged_expectations.ipp b/include/ndnboost/test/impl/logged_expectations.ipp
index 4db7b81..cfe961a 100644
--- a/include/ndnboost/test/impl/logged_expectations.ipp
+++ b/include/ndnboost/test/impl/logged_expectations.ipp
@@ -12,13 +12,13 @@
// Description : Facilities to perform interaction based testng of logged expectations
// ***************************************************************************
-#ifndef BOOST_TEST_LOGGED_EXPECTATIONS_IPP_120905GER
-#define BOOST_TEST_LOGGED_EXPECTATIONS_IPP_120905GER
+#ifndef NDNBOOST_TEST_LOGGED_EXPECTATIONS_IPP_120905GER
+#define NDNBOOST_TEST_LOGGED_EXPECTATIONS_IPP_120905GER
// Boost.Test
#include <ndnboost/test/detail/config.hpp>
-#if BOOST_TEST_SUPPORT_INTERACTION_TESTING
+#if NDNBOOST_TEST_SUPPORT_INTERACTION_TESTING
#include <ndnboost/test/detail/global_typedef.hpp>
@@ -80,11 +80,11 @@
expectations_logger::expectations_logger( const_string log_file_name, bool test_or_log )
: m_test_or_log( test_or_log )
{
- BOOST_REQUIRE_MESSAGE( !log_file_name.is_empty(), "Empty expectations log file name" );
+ NDNBOOST_REQUIRE_MESSAGE( !log_file_name.is_empty(), "Empty expectations log file name" );
m_log_file.open( log_file_name.begin(), test_or_log ? std::ios::in : std::ios::out );
- BOOST_REQUIRE_MESSAGE( m_log_file.is_open(),
+ NDNBOOST_REQUIRE_MESSAGE( m_log_file.is_open(),
"Can't open expectations log file " << log_file_name
<< " for " << ( m_test_or_log ? "reading" : "writing") );
@@ -96,9 +96,9 @@
const_string cline( line );
string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
- BOOST_CHECK_EQUAL( *tit, FILE_SIG );
+ NDNBOOST_CHECK_EQUAL( *tit, FILE_SIG );
++tit;
- BOOST_CHECK_EQUAL( *tit, ELOG_VER );
+ NDNBOOST_CHECK_EQUAL( *tit, ELOG_VER );
}
else {
m_log_file << FILE_SIG << CLMN_SEP << ELOG_VER << LINE_SEP;
@@ -118,7 +118,7 @@
const_string cline( line );
string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
- BOOST_CHECK_EQUAL( *tit, DP_SIG ); ++tit;
+ NDNBOOST_CHECK_EQUAL( *tit, DP_SIG ); ++tit;
return lexical_cast<bool>( *tit );
}
else {
@@ -141,8 +141,8 @@
const_string cline( line );
string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
- BOOST_CHECK_EQUAL( *tit, SCOPE_SIG ); ++tit;
- BOOST_CHECK_EQUAL( *tit, scope_name );
+ NDNBOOST_CHECK_EQUAL( *tit, SCOPE_SIG ); ++tit;
+ NDNBOOST_CHECK_EQUAL( *tit, scope_name );
}
else {
m_log_file << SCOPE_SIG << CLMN_SEP << scope_name << LINE_SEP;
@@ -164,8 +164,8 @@
const_string cline( line );
string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
- BOOST_CHECK_EQUAL( *tit, ALLOC_SIG ); ++tit;
- BOOST_CHECK_EQUAL( lexical_cast<std::size_t>( *tit ), s );
+ NDNBOOST_CHECK_EQUAL( *tit, ALLOC_SIG ); ++tit;
+ NDNBOOST_CHECK_EQUAL( lexical_cast<std::size_t>( *tit ), s );
}
else {
m_log_file << ALLOC_SIG << CLMN_SEP << s << LINE_SEP;
@@ -185,8 +185,8 @@
const_string cline( line );
string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
- BOOST_CHECK_EQUAL( *tit, DATA_SIG ); ++tit;
- BOOST_CHECK_EQUAL( *tit, d );
+ NDNBOOST_CHECK_EQUAL( *tit, DATA_SIG ); ++tit;
+ NDNBOOST_CHECK_EQUAL( *tit, d );
}
else {
m_log_file << DATA_SIG << CLMN_SEP << d << LINE_SEP;
@@ -206,7 +206,7 @@
const_string cline( line );
string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
- BOOST_CHECK_EQUAL( *tit, RETURN_SIG ); ++tit;
+ NDNBOOST_CHECK_EQUAL( *tit, RETURN_SIG ); ++tit;
return std::string( tit->begin(), tit->size() );
}
@@ -223,7 +223,7 @@
// ************** logged expectations test ************** //
// ************************************************************************** //
-void BOOST_TEST_DECL
+void NDNBOOST_TEST_DECL
logged_expectations( callback0<> const& F, const_string log_file_name, bool test_or_log )
{
expectations_logger el( log_file_name, test_or_log );
@@ -243,4 +243,4 @@
#endif // not ancient compiler
-#endif // BOOST_TEST_LOGGED_EXPECTATIONS_IPP_120905GER
+#endif // NDNBOOST_TEST_LOGGED_EXPECTATIONS_IPP_120905GER
diff --git a/include/ndnboost/test/impl/plain_report_formatter.ipp b/include/ndnboost/test/impl/plain_report_formatter.ipp
index 1f0aaac..97bfd1d 100644
--- a/include/ndnboost/test/impl/plain_report_formatter.ipp
+++ b/include/ndnboost/test/impl/plain_report_formatter.ipp
@@ -12,8 +12,8 @@
// Description : plain report formatter definition
// ***************************************************************************
-#ifndef BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
-#define BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
+#ifndef NDNBOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
+#define NDNBOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
// Boost.Test
#include <ndnboost/test/output/plain_report_formatter.hpp>
@@ -30,7 +30,7 @@
#include <ndnboost/test/detail/suppress_warnings.hpp>
-# ifdef BOOST_NO_STDC_NAMESPACE
+# ifdef NDNBOOST_NO_STDC_NAMESPACE
namespace std { using ::log10; }
# endif
@@ -195,4 +195,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
+#endif // NDNBOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
diff --git a/include/ndnboost/test/impl/progress_monitor.ipp b/include/ndnboost/test/impl/progress_monitor.ipp
index ac93432..9c4ee88 100644
--- a/include/ndnboost/test/impl/progress_monitor.ipp
+++ b/include/ndnboost/test/impl/progress_monitor.ipp
@@ -12,8 +12,8 @@
// Description : implements simple text based progress monitor
// ***************************************************************************
-#ifndef BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
-#define BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
+#ifndef NDNBOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
+#define NDNBOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
// Boost.Test
#include <ndnboost/test/progress_monitor.hpp>
@@ -107,4 +107,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
+#endif // NDNBOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
diff --git a/include/ndnboost/test/impl/results_collector.ipp b/include/ndnboost/test/impl/results_collector.ipp
index 7b676cf..d862f68 100644
--- a/include/ndnboost/test/impl/results_collector.ipp
+++ b/include/ndnboost/test/impl/results_collector.ipp
@@ -12,8 +12,8 @@
// Description : implements Unit Test results collecting facility.
// ***************************************************************************
-#ifndef BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
-#define BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
+#ifndef NDNBOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
+#define NDNBOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
// Boost.Test
#include <ndnboost/test/unit_test_suite_impl.hpp>
@@ -101,7 +101,7 @@
// ************** results_collector ************** //
// ************************************************************************** //
-#if !BOOST_WORKAROUND(BOOST_MSVC, <1300)
+#if !NDNBOOST_WORKAROUND(NDNBOOST_MSVC, <1300)
namespace {
@@ -213,11 +213,11 @@
bool num_failures_match = tr.p_aborted || tr.p_assertions_failed >= tr.p_expected_failures;
if( !num_failures_match )
- BOOST_TEST_MESSAGE( "Test case " << tu.p_name << " has fewer failures than expected" );
+ NDNBOOST_TEST_MESSAGE( "Test case " << tu.p_name << " has fewer failures than expected" );
bool check_any_assertions = tr.p_aborted || (tr.p_assertions_failed != 0) || (tr.p_assertions_passed != 0);
if( !check_any_assertions )
- BOOST_TEST_MESSAGE( "Test case " << tu.p_name << " did not check any assertions" );
+ NDNBOOST_TEST_MESSAGE( "Test case " << tu.p_name << " did not check any assertions" );
}
}
@@ -291,4 +291,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
+#endif // NDNBOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
diff --git a/include/ndnboost/test/impl/results_reporter.ipp b/include/ndnboost/test/impl/results_reporter.ipp
index 1009a3d..d66fa84 100644
--- a/include/ndnboost/test/impl/results_reporter.ipp
+++ b/include/ndnboost/test/impl/results_reporter.ipp
@@ -12,8 +12,8 @@
// Description : result reporting facilties
// ***************************************************************************
-#ifndef BOOST_TEST_RESULTS_REPORTER_IPP_020105GER
-#define BOOST_TEST_RESULTS_REPORTER_IPP_020105GER
+#ifndef NDNBOOST_TEST_RESULTS_REPORTER_IPP_020105GER
+#define NDNBOOST_TEST_RESULTS_REPORTER_IPP_020105GER
// Boost.Test
#include <ndnboost/test/results_reporter.hpp>
@@ -199,4 +199,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_RESULTS_REPORTER_IPP_020105GER
+#endif // NDNBOOST_TEST_RESULTS_REPORTER_IPP_020105GER
diff --git a/include/ndnboost/test/impl/test_main.ipp b/include/ndnboost/test/impl/test_main.ipp
index 5991f1c..933183e 100644
--- a/include/ndnboost/test/impl/test_main.ipp
+++ b/include/ndnboost/test/impl/test_main.ipp
@@ -13,8 +13,8 @@
// Description : implements main function for Test Execution Monitor.
// ***************************************************************************
-#ifndef BOOST_TEST_TEST_MAIN_IPP_012205GER
-#define BOOST_TEST_TEST_MAIN_IPP_012205GER
+#ifndef NDNBOOST_TEST_TEST_MAIN_IPP_012205GER
+#define NDNBOOST_TEST_TEST_MAIN_IPP_012205GER
// Boost.Test
#include <ndnboost/test/framework.hpp>
@@ -37,7 +37,7 @@
int test_main_result = test_main( m_argc, m_argv );
// translate a test_main non-success return into a test error
- BOOST_CHECK( test_main_result == 0 || test_main_result == ndnboost::exit_success );
+ NDNBOOST_CHECK( test_main_result == 0 || test_main_result == ndnboost::exit_success );
}
private:
@@ -56,7 +56,7 @@
framework::master_test_suite().p_name.value = "Test Program";
- framework::master_test_suite().add( BOOST_TEST_CASE( test_main_caller( argc, argv ) ) );
+ framework::master_test_suite().add( NDNBOOST_TEST_CASE( test_main_caller( argc, argv ) ) );
return 0;
}
@@ -65,4 +65,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_TEST_MAIN_IPP_012205GER
+#endif // NDNBOOST_TEST_TEST_MAIN_IPP_012205GER
diff --git a/include/ndnboost/test/impl/test_tools.ipp b/include/ndnboost/test/impl/test_tools.ipp
index b47ef81..488af33 100644
--- a/include/ndnboost/test/impl/test_tools.ipp
+++ b/include/ndnboost/test/impl/test_tools.ipp
@@ -12,8 +12,8 @@
// Description : supplies offline implementation for the Test Tools
// ***************************************************************************
-#ifndef BOOST_TEST_TEST_TOOLS_IPP_012205GER
-#define BOOST_TEST_TEST_TOOLS_IPP_012205GER
+#ifndef NDNBOOST_TEST_TEST_TOOLS_IPP_012205GER
+#define NDNBOOST_TEST_TEST_TOOLS_IPP_012205GER
// Boost.Test
#include <ndnboost/test/test_tools.hpp>
@@ -42,9 +42,9 @@
//____________________________________________________________________________//
-# ifdef BOOST_NO_STDC_NAMESPACE
+# ifdef NDNBOOST_NO_STDC_NAMESPACE
namespace std { using ::strcmp; using ::strlen; using ::isprint; }
-#if !defined( BOOST_NO_CWCHAR )
+#if !defined( NDNBOOST_NO_CWCHAR )
namespace std { using ::wcscmp; }
#endif
# endif
@@ -64,7 +64,7 @@
ostr << '\'' << t << '\'';
else
ostr << std::hex
-#if BOOST_TEST_USE_STD_LOCALE
+#if NDNBOOST_TEST_USE_STD_LOCALE
<< std::showbase
#else
<< "0x"
@@ -79,7 +79,7 @@
{
ostr << std::hex
// showbase is only available for new style streams:
-#if BOOST_TEST_USE_STD_LOCALE
+#if NDNBOOST_TEST_USE_STD_LOCALE
<< std::showbase
#else
<< "0x"
@@ -385,7 +385,7 @@
//____________________________________________________________________________//
-#if !defined( BOOST_NO_CWCHAR )
+#if !defined( NDNBOOST_NO_CWCHAR )
predicate_result
equal_impl( wchar_t const* left, wchar_t const* right )
@@ -393,7 +393,7 @@
return (left && right) ? std::wcscmp( left, right ) == 0 : (left == right);
}
-#endif // !defined( BOOST_NO_CWCHAR )
+#endif // !defined( NDNBOOST_NO_CWCHAR )
//____________________________________________________________________________//
@@ -448,7 +448,7 @@
m_pimpl->m_pattern.open( pattern_file_name.begin(), m );
- BOOST_WARN_MESSAGE( m_pimpl->m_pattern.is_open(),
+ NDNBOOST_WARN_MESSAGE( m_pimpl->m_pattern.is_open(),
"Can't open pattern file " << pattern_file_name
<< " for " << (match_or_save ? "reading" : "writing") );
}
@@ -585,7 +585,7 @@
{
m_pimpl->m_synced_string.erase();
-#ifndef BOOST_NO_STRINGSTREAM
+#ifndef NDNBOOST_NO_STRINGSTREAM
str( std::string() );
#else
seekp( 0, std::ios::beg );
@@ -607,7 +607,7 @@
void
output_test_stream::sync()
{
-#ifdef BOOST_NO_STRINGSTREAM
+#ifdef NDNBOOST_NO_STRINGSTREAM
m_pimpl->m_synced_string.assign( str(), pcount() );
freeze( false );
#else
@@ -625,4 +625,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_TEST_TOOLS_IPP_012205GER
+#endif // NDNBOOST_TEST_TEST_TOOLS_IPP_012205GER
diff --git a/include/ndnboost/test/impl/unit_test_log.ipp b/include/ndnboost/test/impl/unit_test_log.ipp
index 63d089e..c5b7c12 100644
--- a/include/ndnboost/test/impl/unit_test_log.ipp
+++ b/include/ndnboost/test/impl/unit_test_log.ipp
@@ -12,8 +12,8 @@
// Description : implemets Unit Test Log
// ***************************************************************************
-#ifndef BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
-#define BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
+#ifndef NDNBOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
+#define NDNBOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
// Boost.Test
#include <ndnboost/test/unit_test_log.hpp>
@@ -158,7 +158,7 @@
void
unit_test_log_t::test_aborted()
{
- BOOST_TEST_LOG_ENTRY( log_messages ) << "Test is aborted";
+ NDNBOOST_TEST_LOG_ENTRY( log_messages ) << "Test is aborted";
}
//____________________________________________________________________________//
@@ -321,25 +321,25 @@
switch( s_log_impl().m_entry_data.m_level ) {
case log_successful_tests:
s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_INFO );
+ unit_test_log_formatter::NDNBOOST_UTL_ET_INFO );
break;
case log_messages:
s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_MESSAGE );
+ unit_test_log_formatter::NDNBOOST_UTL_ET_MESSAGE );
break;
case log_warnings:
s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_WARNING );
+ unit_test_log_formatter::NDNBOOST_UTL_ET_WARNING );
break;
case log_all_errors:
case log_cpp_exception_errors:
case log_system_errors:
s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_ERROR );
+ unit_test_log_formatter::NDNBOOST_UTL_ET_ERROR );
break;
case log_fatal_errors:
s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_FATAL_ERROR );
+ unit_test_log_formatter::NDNBOOST_UTL_ET_FATAL_ERROR );
break;
case log_nothing:
case log_test_units:
@@ -441,4 +441,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
+#endif // NDNBOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
diff --git a/include/ndnboost/test/impl/unit_test_main.ipp b/include/ndnboost/test/impl/unit_test_main.ipp
index bde871f..12691f5 100644
--- a/include/ndnboost/test/impl/unit_test_main.ipp
+++ b/include/ndnboost/test/impl/unit_test_main.ipp
@@ -12,8 +12,8 @@
// Description : main function implementation for Unit Test Framework
// ***************************************************************************
-#ifndef BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
-#define BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
+#ifndef NDNBOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
+#define NDNBOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
// Boost.Test
#include <ndnboost/test/framework.hpp>
@@ -23,8 +23,8 @@
#include <ndnboost/test/detail/unit_test_parameters.hpp>
-#if !defined(__BORLANDC__) && !BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) && !BOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
-#define BOOST_TEST_SUPPORT_RUN_BY_NAME
+#if !defined(__BORLANDC__) && !NDNBOOST_WORKAROUND( NDNBOOST_MSVC, < 1300 ) && !NDNBOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
+#define NDNBOOST_TEST_SUPPORT_RUN_BY_NAME
#include <ndnboost/test/utils/iterator/token_iterator.hpp>
#endif
@@ -101,7 +101,7 @@
const_string m_value;
};
// Constructor
-#ifndef BOOST_TEST_SUPPORT_RUN_BY_NAME
+#ifndef NDNBOOST_TEST_SUPPORT_RUN_BY_NAME
explicit test_case_filter( const_string ) : m_depth( 0 ) {}
#else
explicit test_case_filter( const_string tc_to_run )
@@ -170,7 +170,7 @@
// ************** unit_test_main ************** //
// ************************************************************************** //
-int BOOST_TEST_DECL
+int NDNBOOST_TEST_DECL
unit_test_main( init_unit_test_func init_func, int argc, char* argv[] )
{
try {
@@ -214,17 +214,17 @@
} // namespace ndnboost
-#if !defined(BOOST_TEST_DYN_LINK) && !defined(BOOST_TEST_NO_MAIN)
+#if !defined(NDNBOOST_TEST_DYN_LINK) && !defined(NDNBOOST_TEST_NO_MAIN)
// ************************************************************************** //
// ************** main function for tests using lib ************** //
// ************************************************************************** //
-int BOOST_TEST_CALL_DECL
+int NDNBOOST_TEST_CALL_DECL
main( int argc, char* argv[] )
{
// prototype for user's unit test init function
-#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+#ifdef NDNBOOST_TEST_ALTERNATIVE_INIT_API
extern bool init_unit_test();
ndnboost::unit_test::init_unit_test_func init_func = &init_unit_test;
@@ -237,10 +237,10 @@
return ::ndnboost::unit_test::unit_test_main( init_func, argc, argv );
}
-#endif // !BOOST_TEST_DYN_LINK && !BOOST_TEST_NO_MAIN
+#endif // !NDNBOOST_TEST_DYN_LINK && !NDNBOOST_TEST_NO_MAIN
//____________________________________________________________________________//
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
+#endif // NDNBOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
diff --git a/include/ndnboost/test/impl/unit_test_monitor.ipp b/include/ndnboost/test/impl/unit_test_monitor.ipp
index 0932bf3..b74701d 100644
--- a/include/ndnboost/test/impl/unit_test_monitor.ipp
+++ b/include/ndnboost/test/impl/unit_test_monitor.ipp
@@ -13,8 +13,8 @@
// Test Framework to monitor test cases run.
// ***************************************************************************
-#ifndef BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
-#define BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
+#ifndef NDNBOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
+#define NDNBOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
// Boost.Test
#include <ndnboost/test/unit_test_monitor.hpp>
@@ -98,4 +98,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
+#endif // NDNBOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
diff --git a/include/ndnboost/test/impl/unit_test_parameters.ipp b/include/ndnboost/test/impl/unit_test_parameters.ipp
index ffc29c9..65f3fa5 100644
--- a/include/ndnboost/test/impl/unit_test_parameters.ipp
+++ b/include/ndnboost/test/impl/unit_test_parameters.ipp
@@ -15,8 +15,8 @@
// facility
// ***************************************************************************
-#ifndef BOOST_TEST_UNIT_TEST_PARAMETERS_IPP_012205GER
-#define BOOST_TEST_UNIT_TEST_PARAMETERS_IPP_012205GER
+#ifndef NDNBOOST_TEST_UNIT_TEST_PARAMETERS_IPP_012205GER
+#define NDNBOOST_TEST_UNIT_TEST_PARAMETERS_IPP_012205GER
// Boost.Test
#include <ndnboost/test/detail/unit_test_parameters.hpp>
@@ -58,7 +58,7 @@
//____________________________________________________________________________//
-# ifdef BOOST_NO_STDC_NAMESPACE
+# ifdef NDNBOOST_NO_STDC_NAMESPACE
namespace std { using ::getenv; using ::strncmp; using ::strcmp; }
# endif
@@ -93,7 +93,7 @@
in >> val;
ll = log_level_name[val];
- BOOST_TEST_SETUP_ASSERT( ll != unit_test::invalid_log_level, "invalid log level " + val );
+ NDNBOOST_TEST_SETUP_ASSERT( ll != unit_test::invalid_log_level, "invalid log level " + val );
return in;
}
@@ -116,7 +116,7 @@
in >> val;
rl = report_level_name[val];
- BOOST_TEST_SETUP_ASSERT( rl != INV_REPORT_LEVEL, "invalid report level " + val );
+ NDNBOOST_TEST_SETUP_ASSERT( rl != INV_REPORT_LEVEL, "invalid report level " + val );
return in;
}
@@ -138,7 +138,7 @@
in >> val;
of = output_format_name[val];
- BOOST_TEST_SETUP_ASSERT( of != unit_test::INV_OF, "invalid output format " + val );
+ NDNBOOST_TEST_SETUP_ASSERT( of != unit_test::INV_OF, "invalid output format " + val );
return in;
}
@@ -175,25 +175,25 @@
std::string USE_ALT_STACK = "use_alt_stack";
fixed_mapping<const_string,const_string> parameter_2_env_var(
- AUTO_START_DBG , "BOOST_TEST_AUTO_START_DBG",
- BREAK_EXEC_PATH , "BOOST_TEST_BREAK_EXEC_PATH",
- BUILD_INFO , "BOOST_TEST_BUILD_INFO",
- CATCH_SYS_ERRORS , "BOOST_TEST_CATCH_SYSTEM_ERRORS",
- DETECT_FP_EXCEPT , "BOOST_TEST_DETECT_FP_EXCEPTIONS",
- DETECT_MEM_LEAKS , "BOOST_TEST_DETECT_MEMORY_LEAK",
- LOG_FORMAT , "BOOST_TEST_LOG_FORMAT",
- LOG_LEVEL , "BOOST_TEST_LOG_LEVEL",
- LOG_SINK , "BOOST_TEST_LOG_SINK",
- OUTPUT_FORMAT , "BOOST_TEST_OUTPUT_FORMAT",
- RANDOM_SEED , "BOOST_TEST_RANDOM",
- REPORT_FORMAT , "BOOST_TEST_REPORT_FORMAT",
- REPORT_LEVEL , "BOOST_TEST_REPORT_LEVEL",
- REPORT_SINK , "BOOST_TEST_REPORT_SINK",
- RESULT_CODE , "BOOST_TEST_RESULT_CODE",
- TESTS_TO_RUN , "BOOST_TESTS_TO_RUN",
- SAVE_TEST_PATTERN , "BOOST_TEST_SAVE_PATTERN",
- SHOW_PROGRESS , "BOOST_TEST_SHOW_PROGRESS",
- USE_ALT_STACK , "BOOST_TEST_USE_ALT_STACK",
+ AUTO_START_DBG , "NDNBOOST_TEST_AUTO_START_DBG",
+ BREAK_EXEC_PATH , "NDNBOOST_TEST_BREAK_EXEC_PATH",
+ BUILD_INFO , "NDNBOOST_TEST_BUILD_INFO",
+ CATCH_SYS_ERRORS , "NDNBOOST_TEST_CATCH_SYSTEM_ERRORS",
+ DETECT_FP_EXCEPT , "NDNBOOST_TEST_DETECT_FP_EXCEPTIONS",
+ DETECT_MEM_LEAKS , "NDNBOOST_TEST_DETECT_MEMORY_LEAK",
+ LOG_FORMAT , "NDNBOOST_TEST_LOG_FORMAT",
+ LOG_LEVEL , "NDNBOOST_TEST_LOG_LEVEL",
+ LOG_SINK , "NDNBOOST_TEST_LOG_SINK",
+ OUTPUT_FORMAT , "NDNBOOST_TEST_OUTPUT_FORMAT",
+ RANDOM_SEED , "NDNBOOST_TEST_RANDOM",
+ REPORT_FORMAT , "NDNBOOST_TEST_REPORT_FORMAT",
+ REPORT_LEVEL , "NDNBOOST_TEST_REPORT_LEVEL",
+ REPORT_SINK , "NDNBOOST_TEST_REPORT_SINK",
+ RESULT_CODE , "NDNBOOST_TEST_RESULT_CODE",
+ TESTS_TO_RUN , "NDNBOOST_TESTS_TO_RUN",
+ SAVE_TEST_PATTERN , "NDNBOOST_TEST_SAVE_PATTERN",
+ SHOW_PROGRESS , "NDNBOOST_TEST_SHOW_PROGRESS",
+ USE_ALT_STACK , "NDNBOOST_TEST_USE_ALT_STACK",
""
);
@@ -412,7 +412,7 @@
catch_sys_errors()
{
return retrieve_parameter( CATCH_SYS_ERRORS, s_cla_parser,
-#ifdef BOOST_TEST_DEFAULTS_TO_CORE_DUMP
+#ifdef NDNBOOST_TEST_DEFAULTS_TO_CORE_DUMP
false
#else
true
@@ -524,4 +524,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_UNIT_TEST_PARAMETERS_IPP_012205GER
+#endif // NDNBOOST_TEST_UNIT_TEST_PARAMETERS_IPP_012205GER
diff --git a/include/ndnboost/test/impl/unit_test_suite.ipp b/include/ndnboost/test/impl/unit_test_suite.ipp
index 983682d..aea396e 100644
--- a/include/ndnboost/test/impl/unit_test_suite.ipp
+++ b/include/ndnboost/test/impl/unit_test_suite.ipp
@@ -13,8 +13,8 @@
// Extensions can be provided in separate files
// ***************************************************************************
-#ifndef BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
-#define BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
+#ifndef NDNBOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
+#define NDNBOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
// Boost.Test
#include <ndnboost/detail/workaround.hpp>
@@ -33,8 +33,8 @@
#include <ndnboost/test/detail/suppress_warnings.hpp>
-#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- BOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) \
+#if NDNBOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
+ NDNBOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) \
/**/
using std::rand; // rand is in std and random_shuffle is in _STL
#endif
@@ -78,7 +78,7 @@
bool
test_unit::check_dependencies() const
{
- BOOST_TEST_FOREACH( test_unit_id, tu_id, m_dependencies ) {
+ NDNBOOST_TEST_FOREACH( test_unit_id, tu_id, m_dependencies ) {
if( !unit_test::results_collector.results( tu_id ).passed() )
return false;
}
@@ -108,7 +108,7 @@
, m_test_func( test_func )
{
// !! weirdest MSVC BUG; try to remove this statement; looks like it eats first token of next statement
-#if BOOST_WORKAROUND(BOOST_MSVC,<1300)
+#if NDNBOOST_WORKAROUND(NDNBOOST_MSVC,<1300)
0;
#endif
framework::register_test_unit( this );
@@ -172,7 +172,7 @@
test_unit_id
test_suite::get( const_string tu_name ) const
{
- BOOST_TEST_FOREACH( test_unit_id, id, m_members ) {
+ NDNBOOST_TEST_FOREACH( test_unit_id, id, m_members ) {
if( tu_name == framework::get( id, ut_detail::test_id_2_unit_type( id ) ).p_name.get() )
return id;
}
@@ -203,13 +203,13 @@
try {
if( runtime_config::random_seed() == 0 ) {
- BOOST_TEST_FOREACH( test_unit_id, id, suite.m_members )
+ NDNBOOST_TEST_FOREACH( test_unit_id, id, suite.m_members )
traverse_test_tree( id, V );
}
else {
std::vector<test_unit_id> members( suite.m_members );
std::random_shuffle( members.begin(), members.end() );
- BOOST_TEST_FOREACH( test_unit_id, id, members )
+ NDNBOOST_TEST_FOREACH( test_unit_id, id, members )
traverse_test_tree( id, V );
}
@@ -284,7 +284,7 @@
if( id != INV_TEST_UNIT_ID ) {
ts = &framework::get<test_suite>( id ); // !! test for invalid tu type
- BOOST_ASSERT( ts->p_parent_id == curr_ts_store().back()->p_id );
+ NDNBOOST_ASSERT( ts->p_parent_id == curr_ts_store().back()->p_id );
}
else {
ts = new test_suite( ts_name );
@@ -343,4 +343,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
+#endif // NDNBOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
diff --git a/include/ndnboost/test/impl/xml_log_formatter.ipp b/include/ndnboost/test/impl/xml_log_formatter.ipp
index 0bf6460..49321c3 100644
--- a/include/ndnboost/test/impl/xml_log_formatter.ipp
+++ b/include/ndnboost/test/impl/xml_log_formatter.ipp
@@ -12,8 +12,8 @@
// Description : implements XML Log formatter
// ***************************************************************************
-#ifndef BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
-#define BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
+#ifndef NDNBOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
+#define NDNBOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
// Boost.Test
#include <ndnboost/test/output/xml_log_formatter.hpp>
@@ -68,12 +68,12 @@
xml_log_formatter::log_build_info( std::ostream& ostr )
{
ostr << "<BuildInfo"
- << " platform" << attr_value() << BOOST_PLATFORM
- << " compiler" << attr_value() << BOOST_COMPILER
- << " stl" << attr_value() << BOOST_STDLIB
- << " boost=\"" << BOOST_VERSION/100000 << "."
- << BOOST_VERSION/100 % 1000 << "."
- << BOOST_VERSION % 100 << '\"'
+ << " platform" << attr_value() << NDNBOOST_PLATFORM
+ << " compiler" << attr_value() << NDNBOOST_COMPILER
+ << " stl" << attr_value() << NDNBOOST_STDLIB
+ << " boost=\"" << NDNBOOST_VERSION/100000 << "."
+ << NDNBOOST_VERSION/100 % 1000 << "."
+ << NDNBOOST_VERSION % 100 << '\"'
<< "/>";
}
@@ -142,9 +142,9 @@
m_curr_tag = xml_tags[let];
ostr << '<' << m_curr_tag
- << BOOST_TEST_L( " file" ) << attr_value() << entry_data.m_file_name
- << BOOST_TEST_L( " line" ) << attr_value() << entry_data.m_line_num
- << BOOST_TEST_L( "><![CDATA[" );
+ << NDNBOOST_TEST_L( " file" ) << attr_value() << entry_data.m_file_name
+ << NDNBOOST_TEST_L( " line" ) << attr_value() << entry_data.m_line_num
+ << NDNBOOST_TEST_L( "><![CDATA[" );
}
//____________________________________________________________________________//
@@ -160,7 +160,7 @@
void
xml_log_formatter::log_entry_finish( std::ostream& ostr )
{
- ostr << BOOST_TEST_L( "]]></" ) << m_curr_tag << BOOST_TEST_L( ">" );
+ ostr << NDNBOOST_TEST_L( "]]></" ) << m_curr_tag << NDNBOOST_TEST_L( ">" );
m_curr_tag.clear();
}
@@ -177,4 +177,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
+#endif // NDNBOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
diff --git a/include/ndnboost/test/impl/xml_report_formatter.ipp b/include/ndnboost/test/impl/xml_report_formatter.ipp
index 92655ee..42b28a7 100644
--- a/include/ndnboost/test/impl/xml_report_formatter.ipp
+++ b/include/ndnboost/test/impl/xml_report_formatter.ipp
@@ -12,8 +12,8 @@
// Description : XML report formatter
// ***************************************************************************
-#ifndef BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
-#define BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
+#ifndef NDNBOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
+#define NDNBOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
// Boost.Test
#include <ndnboost/test/results_collector.hpp>
@@ -112,4 +112,4 @@
#include <ndnboost/test/detail/enable_warnings.hpp>
-#endif // BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
+#endif // NDNBOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER