Boost logo

Boost :

Subject: Re: [boost] How do you test complex transformations?
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-03-18 17:26:03


Jim Bell wrote:
>
> 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.
>
>

Hi,

what kind of verification do you use to do?

for example if we had

T complex_transformation(T a)
{
  T tmp1 = simpler_transformation_x(a);
  T tmp2 = simpler_transformation_y(tmp);
  return tmp;
}

could you complete the example with the use of your test verifications?
where do comes test?

Best,
Vicente

--
View this message in context: http://boost.2283326.n4.nabble.com/How-do-you-test-complex-transformations-tp3387869p3388499.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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