Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-03-18 18:41:18

>From: "David Abrahams" <dave_at_[hidden]>

> Terje Slettebø <tslettebo_at_[hidden]> writes:
> > Also these three tests, like MSVC 6, concerns tests where it doesn't
> > when it's supposed to:
> >
> > BOOST_CHECK_THROW(lexical_cast<int>(" 123"), boost::bad_lexical_cast);
> > BOOST_CHECK_THROW(lexical_cast<int>(std::string(" 123")),
> > boost::bad_lexical_cast);
> > BOOST_CHECK_THROW(lexical_cast<bool>(123), boost::bad_lexical_cast);
> >
> > If these are omitted for g++ 2.95.x, all tests pass for that compiler.
> > However, as it compiles without errors on both MSVC 6 and g++ 2.95.x,
> > one shouldn't have any BOOST_WORKAROUND's in the test code?
> >
> > That will make it show up as failing on MSVC 6 and g++ 2.95.x, even
> > it passes almost all the enabled tests on both.
> Often the cure is to break the test into two parts, so that you can
> demonstrate passing the majority of tests even on broken compilers.

Yeah. That's what is done with the 10 tests making up the suite - 6 for char
and 4 for wide character.

However, the three failing tests for each of MSVC 6 and g++ 2.95 (different
ones for the two) are in the middle of some wide character tests.

As Beman also points out, what is most important is that lexical_cast
doesn't cause other components to fail, even if they don't use an
unsupported feature. Therefore, to not mask any run-time errors on MSVC 6
and g++ 2.95, one may remove the BOOST_WORKAROUND's, since the failing tests
don't appear to have much in common.

Anyway, now that you've has committed it, we'll see how it goes in the
regression test. At least BOOST_TESTED_AT should be taken out before the
release, as you said.



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