| || |
How can one write meaningful robustness tests in the unit testing phase, where a function is considered as unit under test.
The programming language used is C.
For eg. if function signature is
void Fn(unsigned long a, char b)
How can I test with signed values , as well as values greater than (2^32)-1 for unsigned long?
And values greater than 255 for char ?
(The compiler stores signed values as 0xFFFFFFFF in an unsigned varaible)
Thanks & Regards
Re: Robustness Tests
I believe that the compiler would catch all errors like this except dynamically called functions (function pointers). You'd would then receive a runtime exception instead of a compiler error.