Boost logo

Boost :

Subject: Re: [boost] How do you test complex transformations?
From: Jim Bell (Jim_at_[hidden])
Date: 2011-03-18 13:51:18


On 1:59 PM, Vicente Botet wrote:
> [...]
> One technique could be to make the transformation by hand and keep track of
> the input -> output association.
> Another technique consist in re-implementing the algorithm and check that
> both implementations match.
>

I more often verify a couple test-cases by hand and encode those, paying
special attention to boundary conditions, etc.

Some situations are complex enough that they warrant test hooks to
verify intermediate results. And, yes, I leave the hooks in. E.g., "if
(test) test->VerifyIntermdiateX(y,z);" Make sure the test-hook pointer
is 0 for production.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk