Remarks and corrections to Section 1.3

"Unit testing"

Generic testing for sorting three numbers

The task is to sort three numbers x,y,z by using if-then-else instructions. This needs thorough testing, by considering all possibilities:

These are really all cases, provided the program only uses equality and inequality comparisons between the numbers.

Valid XHTML 1.0 Strict
Oliver Kullmann
Last modified: Fri Sep 25 17:07:33 BST 2009