|
Boost Users : |
From: Ross Boylan (ross_at_[hidden])
Date: 2005-12-26 18:22:35
On Thu, Dec 22, 2005 at 10:55:18AM -0500, Gennadiy Rozental wrote:
> >I have a unit test case that includes
> > #include <boost/test/auto_unit_test.hpp>
> > #include <boost/test/floating_point_comparison.hpp>
> > // I will try without the unit test namespace
> > // 1.32 using boost::test_toolbox::ostream_test_stream;
> > using boost::test_toolbox::output_test_stream;
> >
> > output_test_stream ostream;
> >
> > This worked in 1.32 (I think--the comment makes it sound as if it
> > shouldn't). But in 1.33 I get
> > error: `output_test_stream' not declared
>
> Sorry for unclear docs. output_test_stream reside in subnamespace test_tools
> now. Though I expect old namespace still to work. Because test_tools.hpp
> contains:
>
> namespace test_toolbox = test_tools;
>
> I am working on documentation update at the moment. Hopefully next release
> this confusion is going to be remedied.
>
> HTH,
>
> Gennadiy
Thanks. I think the key thing I was missing was the appropriate
include, which I guess is necessary now but didn't used to be needed.
Here's a snippet of the code that seemed to work (I'm still having
problems, but I think they're unrelated):
#include <boost/version.hpp>
#include <boost/test/auto_unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
// I will try without the unit test namespace
// 1.32 using boost::test_toolbox::ostream_test_stream;
#if BOOST_VERSION>=103300
#include <boost/test/output_test_stream.hpp>
using boost::test_tools::output_test_stream;
#warning doing the 1.33 thing
#else
using boost::test_toolbox::output_test_stream;
#endif
Ross
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net