
166 SOF T WARE ENGINEERING AND TESTING
algorithm’s execution. Boundary conditions are tested to ensure that the module
operates properly at the boundaries established to limit or restrict processing. All
independent paths through the control structure are exercised to ensure that all
statements in a module have been executed at least once. And finally, all error-
handling paths are tested.
FIGURE 7.4 Unit Tests
Common errors in computation are:
Incorrect arithmetic precedence
Mixed code operations
Incorrect initialization
Precision inaccuracy
Incorrect symbolic representation of an expression
Test cases in unit testing should ...