ndnboost: Also rename BOOST_ to NDNBOOST_
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