|
Boost : |
From: rogeeff (rogeeff_at_[hidden])
Date: 2002-01-23 22:50:44
I was not clear enough in previos message. You can specify a number
of assertions that could fail inside any test case. Your point is
still valid but it should be rather rare case. Any other more
sophisticated method would affect usability. For example,
void foo()
{
BOOST_CHECK(...);
BOOST_CHECK_EQUAL( ... );
BOOST_CHECK_CLOSE( ..., 1e-5 );
}
Sunce floating-point arithmentic working differently on different
platforms, you may expect that last assertion may fail on some of
them. So when adding new test case you would write:
...
ts->add( BOOST_TEST_CASE( &foo,
#if defined(__SUNPRO_CC)
1
#else
0
#endif
) );
Gennadiy.
--- In boost_at_y..., Jeremy Siek <jsiek_at_c...> wrote:
>
> Actually, just having the expected number is not very accurate...
what if
> by some freak accident an expected failure turns into a success
while at
> the same time a usually successful test starts to fail. The number
of
> failures will stay the same, telling us nothing about the problems
that
> are occuring. It would be much better to have a specific list of
the tests
> that are expected to fail.
>
> On Thu, 24 Jan 2002, rogeeff wrote:
> rogeef> New Test Library present mechanism for defining expected
number of
> rogeef> failures. You still need to set appropriate value for each
compiler.
> rogeef>
> rogeef> Gennadiy.
>
> --------------------------------------------------------------------
-- > Jeremy Siek http://php.indiana.edu/~jsiek/ > Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_o... > C++ Booster (http://www.boost.org) office phone: (812) 855-3608 > -------------------------------------------------------------------- --
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk