
18 Mar
2011
18 Mar
'11
5:51 p.m.
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.