Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Test] C++ Unit Tests with Boost.Test, Part 1
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-07-07 09:50:40


Johan Nilsson <r.johan.nilsson <at> gmail.com> writes:

> As for REQUIRE vs CHECK there's another point of view IMHO; either the SUT
> works or it does not. Why (in automated testing) bother checking whether
> something "half-works"? If you are into "manually" verifying stuff by
> looking at and interpreting large amounts of output on the screen IMHO
> you're not really doing automated unit/developer testing.

I am not gonna argue virtues of of using single or multiple asserts in test
cases. My only point is that you can't have it both ways. Either you have single
assertion per test case policy, or you agree people to use CHECK to validate
independent assertions within the same test case. REQUIRE still needs to be used
in case of dependent assertions.

Gennadiy


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