Skip to content

Commit

Permalink
Don't run the compile-time buffer test.
Browse files Browse the repository at this point in the history
Fixes boost trac ticket #8295.
  • Loading branch information
chriskohlhoff committed May 4, 2014
1 parent e81c5c4 commit fd8471c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/buffer.cpp
Expand Up @@ -242,5 +242,5 @@ void test()
BOOST_ASIO_TEST_SUITE
(
"buffer",
BOOST_ASIO_TEST_CASE(buffer_compile::test)
BOOST_ASIO_COMPILE_TEST_CASE(buffer_compile::test)
)
12 changes: 12 additions & 0 deletions test/unit_test.hpp
Expand Up @@ -66,6 +66,10 @@
test(); \
std::cout << #test << " passed" << std::endl;

#define BOOST_ASIO_COMPILE_TEST_CASE(test) \
compile_test<&test>(); \
std::cout << #test << " passed" << std::endl;

#else // defined(BOOST_ASIO_STANDALONE)

#include <boost/test/unit_test.hpp>
Expand All @@ -90,6 +94,9 @@ using boost::unit_test::test_suite;
#define BOOST_ASIO_TEST_CASE(test) \
t->add(BOOST_TEST_CASE(&test));

#define BOOST_ASIO_COMPILE_TEST_CASE(test) \
t->add(BOOST_TEST_CASE(&compile_test<&test>));

#endif // defined(BOOST_ASIO_STANDALONE)

#if defined(BOOST_ASIO_MSVC)
Expand All @@ -100,4 +107,9 @@ inline void null_test()
{
}

template <void (*)()>
inline void compile_test()
{
}

#endif // UNIT_TEST_HPP

0 comments on commit fd8471c

Please sign in to comment.