ndnboost: Also rename BOOST_ to NDNBOOST_
diff --git a/include/ndnboost/detail/lightweight_test.hpp b/include/ndnboost/detail/lightweight_test.hpp
index 252a2be..40e7cd6 100644
--- a/include/ndnboost/detail/lightweight_test.hpp
+++ b/include/ndnboost/detail/lightweight_test.hpp
@@ -1,5 +1,5 @@
-#ifndef BOOST_DETAIL_LIGHTWEIGHT_TEST_HPP_INCLUDED
-#define BOOST_DETAIL_LIGHTWEIGHT_TEST_HPP_INCLUDED
+#ifndef NDNBOOST_DETAIL_LIGHTWEIGHT_TEST_HPP_INCLUDED
+#define NDNBOOST_DETAIL_LIGHTWEIGHT_TEST_HPP_INCLUDED
// MS compatible compilers support #pragma once
@@ -23,38 +23,38 @@
// If expression is false increases the error count
// and outputs a message containing 'expression'
//
-// BOOST_TEST(expression)
+// NDNBOOST_TEST(expression)
//
// ---------------
//
// Increases error count and outputs a message containing 'message'
//
-// BOOST_ERROR(message)
+// NDNBOOST_ERROR(message)
//
// ---------------
//
// If 'expr1' != 'expr2' increases the error count
// and outputs a message containing both expressions
//
-// BOOST_TEST_EQ(expr1, expr2)
+// NDNBOOST_TEST_EQ(expr1, expr2)
//
// ---------------
//
// If 'expr1' == 'expr2' increases the error count
// and outputs a message containing both expressions
//
-// BOOST_TEST_NE(expr1, expr2)
+// NDNBOOST_TEST_NE(expr1, expr2)
//
// ---------------
//
-// If BOOST_NO_EXCEPTIONS is NOT defined and if 'expr' does not
+// If NDNBOOST_NO_EXCEPTIONS is NOT defined and if 'expr' does not
// throw an exception of type 'excep', increases the error count
// and outputs a message containing the expression.
//
-// If BOOST_NO_EXCEPTIONS is defined, this macro expands to nothing
+// If NDNBOOST_NO_EXCEPTIONS is defined, this macro expands to nothing
// and 'expr' is not evaluated.
//
-// BOOST_TEST_THROWS(expr, excep)
+// NDNBOOST_TEST_THROWS(expr, excep)
//
// ---------------
//
@@ -70,8 +70,8 @@
// IDE's like Visual Studio perform better if output goes to std::cout or
// some other stream, so allow user to configure output stream:
-#ifndef BOOST_LIGHTWEIGHT_TEST_OSTREAM
-# define BOOST_LIGHTWEIGHT_TEST_OSTREAM std::cerr
+#ifndef NDNBOOST_LIGHTWEIGHT_TEST_OSTREAM
+# define NDNBOOST_LIGHTWEIGHT_TEST_OSTREAM std::cerr
#endif
namespace ndnboost
@@ -86,7 +86,7 @@
report_errors_reminder() : called_report_errors_function(false) {}
~report_errors_reminder()
{
- BOOST_ASSERT(called_report_errors_function); // verify report_errors() was called
+ NDNBOOST_ASSERT(called_report_errors_function); // verify report_errors() was called
}
};
@@ -105,7 +105,7 @@
inline void test_failed_impl(char const * expr, char const * file, int line, char const * function)
{
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ NDNBOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): test '" << expr << "' failed in function '"
<< function << "'" << std::endl;
++test_errors();
@@ -113,7 +113,7 @@
inline void error_impl(char const * msg, char const * file, int line, char const * function)
{
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ NDNBOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): " << msg << " in function '"
<< function << "'" << std::endl;
++test_errors();
@@ -121,7 +121,7 @@
inline void throw_failed_impl(char const * excep, char const * file, int line, char const * function)
{
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ NDNBOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): Exception '" << excep << "' not thrown in function '"
<< function << "'" << std::endl;
++test_errors();
@@ -135,7 +135,7 @@
}
else
{
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ NDNBOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): test '" << expr1 << " == " << expr2
<< "' failed in function '" << function << "': "
<< "'" << t << "' != '" << u << "'" << std::endl;
@@ -151,7 +151,7 @@
}
else
{
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ NDNBOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): test '" << expr1 << " != " << expr2
<< "' failed in function '" << function << "': "
<< "'" << t << "' == '" << u << "'" << std::endl;
@@ -169,13 +169,13 @@
if( errors == 0 )
{
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ NDNBOOST_LIGHTWEIGHT_TEST_OSTREAM
<< "No errors detected." << std::endl;
return 0;
}
else
{
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ NDNBOOST_LIGHTWEIGHT_TEST_OSTREAM
<< errors << " error" << (errors == 1? "": "s") << " detected." << std::endl;
return 1;
}
@@ -183,26 +183,26 @@
} // namespace ndnboost
-#define BOOST_TEST(expr) ((expr)? (void)0: ::ndnboost::detail::test_failed_impl(#expr, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION))
-#define BOOST_ERROR(msg) ::ndnboost::detail::error_impl(msg, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION)
-#define BOOST_TEST_EQ(expr1,expr2) ( ::ndnboost::detail::test_eq_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
-#define BOOST_TEST_NE(expr1,expr2) ( ::ndnboost::detail::test_ne_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
-#ifndef BOOST_NO_EXCEPTIONS
- #define BOOST_TEST_THROWS( EXPR, EXCEP ) \
+#define NDNBOOST_TEST(expr) ((expr)? (void)0: ::ndnboost::detail::test_failed_impl(#expr, __FILE__, __LINE__, NDNBOOST_CURRENT_FUNCTION))
+#define NDNBOOST_ERROR(msg) ::ndnboost::detail::error_impl(msg, __FILE__, __LINE__, NDNBOOST_CURRENT_FUNCTION)
+#define NDNBOOST_TEST_EQ(expr1,expr2) ( ::ndnboost::detail::test_eq_impl(#expr1, #expr2, __FILE__, __LINE__, NDNBOOST_CURRENT_FUNCTION, expr1, expr2) )
+#define NDNBOOST_TEST_NE(expr1,expr2) ( ::ndnboost::detail::test_ne_impl(#expr1, #expr2, __FILE__, __LINE__, NDNBOOST_CURRENT_FUNCTION, expr1, expr2) )
+#ifndef NDNBOOST_NO_EXCEPTIONS
+ #define NDNBOOST_TEST_THROWS( EXPR, EXCEP ) \
try { \
EXPR; \
::ndnboost::detail::throw_failed_impl \
- (#EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
+ (#EXCEP, __FILE__, __LINE__, NDNBOOST_CURRENT_FUNCTION); \
} \
catch(EXCEP const&) { \
} \
catch(...) { \
::ndnboost::detail::throw_failed_impl \
- (#EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
+ (#EXCEP, __FILE__, __LINE__, NDNBOOST_CURRENT_FUNCTION); \
} \
//
#else
- #define BOOST_TEST_THROWS( EXPR, EXCEP )
+ #define NDNBOOST_TEST_THROWS( EXPR, EXCEP )
#endif
-#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_TEST_HPP_INCLUDED
+#endif // #ifndef NDNBOOST_DETAIL_LIGHTWEIGHT_TEST_HPP_INCLUDED