Boost logo

Boost :

Subject: Re: [boost] [1.38.0] [Integer] Library in inconsistent state
From: Gubenko, Boris (boris.gubenko_at_[hidden])
Date: 2009-01-31 13:33:02

John Maddock wrote:
> I'll try and take a look, but it'll be tomorrow at the
> earliest now.... and
> then we'll have to wait for the results to cycle and then... etc

I looked at it, before I saw a mail from John. There is only one Boost.Integer test failing on release branch: integer_mask_test.cpp. The failure is linking failure with undefined symbol for main (or _main on some platforms).

Inclusion of <boost/test/minimal.hpp> instead of

        #define BOOST_INCLUDE_MAIN
        #include <boost/test/test_tools.hpp>

fixes the problem -- see patch below. Tested on HP-UX with aC++ and GCC.

If it looks like a correct fix, I can commit it to release branch. The test is very different in trunk and release branch and trunk does not have this linking problem.


Index: test/integer_mask_test.cpp
--- test/integer_mask_test.cpp (revision 50929)
+++ test/integer_mask_test.cpp (working copy)
@@ -10,8 +10,7 @@
 // Revision History
 // 23 Sep 2001 Initial version (Daryle Walker)

-#include <boost/test/test_tools.hpp> // for main
+#include <boost/test/minimal.hpp> // for main

 #include <boost/cstdlib.hpp> // for boost::exit_success
 #include <boost/integer/integer_mask.hpp> // for boost::high_bit_mask_t, etc.

Boost list run by bdawes at, gregod at, cpdaniel at, john at