subgraph test and BOOST_CHECK

Hi all, there are a few cases where I didn't touch the code when replacing BOOST_TEST. One of them is the subgraph test, as there occurs a slightly different problem: It seems to me that this code worked so far: // ...cpp file #include <boost/test/minimal.hpp> // ...some header file #include <boost/test/test_tools.hpp> BOOST_TEST(...); For the code above, the initial declarations of test/minimal.hpp have been used. When you do the same now (after replacing BOOST_TEST), the compiler complains about macro redefinition _and_ you get unresolved externals at linking time. C:\views_cvs\boost\boost\test\test_tools.hpp(81) : warning C4005: 'BOOST_CHECK' : macro redefinition C:\views_cvs\boost\boost\test\minimal.hpp(21) : see previous definition of 'BOOST_CHECK' C:\views_cvs\boost\boost\test\test_tools.hpp(82) : warning C4005: 'BOOST_REQUIRE' : macro redefinition C:\views_cvs\boost\boost\test\minimal.hpp(26) : see previous definition of 'BOOST_REQUIRE' C:\views_cvs\boost\boost\test\test_tools.hpp(92) : warning C4005: 'BOOST_ERROR' : macro redefinition C:\views_cvs\boost\boost\test\minimal.hpp(29) : see previous definition of 'BOOST_ERROR' C:\views_cvs\boost\boost\test\test_tools.hpp(93) : warning C4005: 'BOOST_FAIL' : macro redefinition C:\views_cvs\boost\boost\test\minimal.hpp(31) : see previous definition of 'BOOST_FAIL' Is it intended that these macros are defined differently for the minimal testing facility? If yes, another testing strategy has to be chosen for this case. Nevertheless, I've replaced the occurances of BOOST_TEST now. Stefan

On Feb 8, 2005, at 7:32 AM, Stefan Slapeta wrote:
Hi all,
there are a few cases where I didn't touch the code when replacing BOOST_TEST. One of them is the subgraph test, as there occurs a slightly different problem:
It seems to me that this code worked so far:
// ...cpp file #include <boost/test/minimal.hpp>
// ...some header file #include <boost/test/test_tools.hpp>
The header file needs to change, to include boost/test/minimal.hpp instead. Doug

On Feb 8, 2005, at 9:36 AM, Stefan Slapeta wrote:
Douglas Gregor wrote:
The header file needs to change, to include boost/test/minimal.hpp instead.
are you sure? this would mean that you can include graph_test.hpp in only exactly one translation unit!
I think that's okay. graph_test.hpp is only meant to be included by the one-off tests for the graph lib. It really shouldn't even be in boost/graph, where it is accessible to users. Doug

On Feb 8, 2005, at 1:20 PM, Stefan Slapeta wrote:
Doug Gregor wrote:
I think that's okay. graph_test.hpp is only meant to be included by the one-off tests for the graph lib. It really shouldn't even be in boost/graph, where it is accessible to users.
Are you going to move it and do the other fix or shall I do it?
Done. Doug
participants (3)
-
Doug Gregor
-
Douglas Gregor
-
Stefan Slapeta