Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81143 - trunk/boost/test
From: gennadiy.rozental_at_[hidden]
Date: 2012-11-01 20:28:21


Author: rogeeff
Date: 2012-11-01 20:28:20 EDT (Thu, 01 Nov 2012)
New Revision: 81143
URL: http://svn.boost.org/trac/boost/changeset/81143

Log:
MSVC fixes
Text files modified:
   trunk/boost/test/test_tools.hpp | 37 +++++++++++++++++++++++--------------
   1 files changed, 23 insertions(+), 14 deletions(-)

Modified: trunk/boost/test/test_tools.hpp
==============================================================================
--- trunk/boost/test/test_tools.hpp (original)
+++ trunk/boost/test/test_tools.hpp 2012-11-01 20:28:20 EDT (Thu, 01 Nov 2012)
@@ -129,20 +129,29 @@
 
 #if BOOST_PP_VARIADICS
 
-#define BOOST_TEST_WARN( ... ) BOOST_PP_IIF( \
- BOOST_PP_EQUAL(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),2), \
- BOOST_WARN_MESSAGE, \
- BOOST_WARN_ASSERTION)( __VA_ARGS__ ) \
-/**/
-#define BOOST_TEST( ... ) BOOST_PP_IIF( \
- BOOST_PP_EQUAL(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),2), \
- BOOST_CHECK_MESSAGE, \
- BOOST_CHECK_ASSERTION)( __VA_ARGS__ ) \
-/**/
-#define BOOST_TEST_REQUIRE( ... ) BOOST_PP_IIF( \
- BOOST_PP_EQUAL(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),2), \
- BOOST_REQUIRE_MESSAGE, \
- BOOST_REQUIRE_ASSERTION)( __VA_ARGS__ ) \
+#if BOOST_PP_VARIADICS_MSVC
+#define BOOST_TEST_INVOKE_TOOL( tool, ... ) BOOST_PP_CAT( tool (__VA_ARGS__), )
+#else
+#define BOOST_TEST_INVOKE_TOOL( tool, ... ) tool (__VA_ARGS__)
+#endif
+
+#define BOOST_TEST_WARN( ... ) BOOST_TEST_INVOKE_TOOL( \
+ BOOST_PP_IIF( \
+ BOOST_PP_EQUAL(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),2), \
+ BOOST_WARN_MESSAGE, \
+ BOOST_WARN_ASSERTION), __VA_ARGS__ ) \
+/**/
+#define BOOST_TEST( ... ) BOOST_TEST_INVOKE_TOOL( \
+ BOOST_PP_IIF( \
+ BOOST_PP_EQUAL(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),2), \
+ BOOST_CHECK_MESSAGE, \
+ BOOST_CHECK_ASSERTION), __VA_ARGS__ ) \
+/**/
+#define BOOST_TEST_REQUIRE( ... ) BOOST_TEST_INVOKE_TOOL( \
+ BOOST_PP_IIF( \
+ BOOST_PP_EQUAL(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),2), \
+ BOOST_REQUIRE_MESSAGE, \
+ BOOST_REQUIRE_ASSERTION), __VA_ARGS__ ) \
 /**/
 
 #else


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