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 04:32:19


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

>
> [This is actually mainly comments to Part 2]
>
> Richard wrote:
> > [Please do not mail me a copy of your followup]
> >
> >
<http://legalizeadulthood.wordpress.com/2009/07/04/c-unit-tests-with-boost-test-part-1/>
> >
> > In this post, I will describe how to start making unit tests in C++
> > with Boost.Test.
>
> I've only glanced through the parts, so I might have missed something. Also
> please note that my comments are very much from a TDD point of view.
>
> In Part 2, you recommend using the CHECK macros by default. Being a
> long-time Boost.Test user (as well as a long-time TDD:er) I strongly believe
> that by default one should always use the REQUIRE variety of the Boost.Test
> macros, for a couple of reasons:

This only effectively implements single assertion per test case policy, which is
what you as hardcore TDDer probably doing anyway. For all us other folks CHECK
should be default level. REQUIRE should be used if you actually require one
assertion to pass before you proceed to next one.

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