The short program below passes with MSVC and GCC Linux, but fails with
Mingw-x64 at runtime (the expected failures count gets ignored).
This is with current develop. Any ideas?
BTW the new decorator based approach does work OK, but is only supported
on a tiny number of compilers as it seems to rely on the preprocessor
lib using variadic macros, as opposed to Boost.Config marking them as
available.
Here's the program:
#define BOOST_TEST_MAIN
#include
John Maddock
The short program below passes with MSVC and GCC Linux, but fails with Mingw-x64 at runtime (the expected failures count gets ignored).
This is with current develop. Any ideas?
I do not have access to this setup. How do you get it? anyone else can reproduce this?
BTW the new decorator based approach does work OK, but is only supported on a tiny number of compilers as it seems to rely on the preprocessor lib using variadic macros, as opposed to Boost.Config marking them as available.
Do you refer to #if !BOOST_PP_VARIADICS || ((__cplusplus >= 201103L) && defined(BOOST_NO_CXX11_VARIADIC_MACROS)) #define BOOST_TEST_NO_VARIADIC #endif What other flags should we use? Gennadiy
The short program below passes with MSVC and GCC Linux, but fails with Mingw-x64 at runtime (the expected failures count gets ignored).
This is with current develop. Any ideas? I do not have access to this setup. How do you get it? anyone else can reproduce this? Go to http://sourceforge.net/projects/mingw-w64/files/?source=navbar and click on "download official installer".
I suspect there are some MSVC workarounds which should be enabled for Mingw too?
BTW the new decorator based approach does work OK, but is only supported on a tiny number of compilers as it seems to rely on the preprocessor lib using variadic macros, as opposed to Boost.Config marking them as available. Do you refer to
#if !BOOST_PP_VARIADICS || ((__cplusplus >= 201103L) && defined(BOOST_NO_CXX11_VARIADIC_MACROS)) #define BOOST_TEST_NO_VARIADIC #endif
What other flags should we use?
It depends: if you need variadic support in the PP library then you're doing the right thing (but the new interface will basically only be usable on MSVC/GCC/Clang and nothing else. If you only need variadic support in the compiler then |BOOST_NO_CXX11_VARIADIC_MACROS is the config macro of choice. HTH, John. |
John Maddock
Go to http://sourceforge.net/projects/mingw-w64/files/?source=navbar and click on "download official installer".
I suspect there are some MSVC workarounds which should be enabled for Mingw too?
Ok. I'll give it a try when I have some time.
It depends: if you need variadic support in the PP library then you're doing the right thing (but the new interface will basically only be usable on MSVC/GCC/Clang and nothing else.
BTW, decorators not necessarily require variadics support. You can use compatibility syntax: BOOST_TEST_DECORATOR(...) BOOST_AUTO_TEST_CASE( test ) { ... }
If you only need variadic support in the compiler then |BOOST_NO_CXX11_VARIADIC_MACROS is the config macro of choice.
Ok. I'll see if we can use this where possible. We do use Boost.PP though. Gennadiy
On 7/6/2015 1:32 PM, John Maddock wrote:
The short program below passes with MSVC and GCC Linux, but fails with Mingw-x64 at runtime (the expected failures count gets ignored).
This is with current develop. Any ideas?
BTW the new decorator based approach does work OK, but is only supported on a tiny number of compilers as it seems to rely on the preprocessor lib using variadic macros, as opposed to Boost.Config marking them as available.
Without wishing to defend or disagree with Paul Mensonides' decision to
make Boost PP not depend on Boost config and to use a fairly
conservative test for variadic macro support in Boost PP, Boost.Test
could do:
#include
Here's the program:
#define BOOST_TEST_MAIN #include
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
BOOST_AUTO_TEST_CASE(test_main) { BOOST_ERROR("one"); BOOST_ERROR("two"); }
Without wishing to defend or disagree with Paul Mensonides' decision to make Boost PP not depend on Boost config and to use a fairly conservative test for variadic macro support in Boost PP, Boost.Test could do:
#include
#define BOOST_PP_VARIADICS !BOOST_NO_CXX11_VARIADIC_MACROS before including any Boost PP headers to let config determine variadic macro support.
That's terribly fragile - it would work or not depending on the include order in the users program. John.
On 7/7/2015 4:14 AM, John Maddock wrote:
Without wishing to defend or disagree with Paul Mensonides' decision to make Boost PP not depend on Boost config and to use a fairly conservative test for variadic macro support in Boost PP, Boost.Test could do:
#include
#define BOOST_PP_VARIADICS !BOOST_NO_CXX11_VARIADIC_MACROS before including any Boost PP headers to let config determine variadic macro support.
That's terribly fragile - it would work or not depending on the include order in the users program.
You are right. I was thinking only in terms of Boost.Test.
participants (3)
-
Edward Diener
-
Gennadiy Rozental
-
John Maddock