doExpression( $input ); if ( $result != $expected ) { print "FAILING test -- $input gave a final result of $result, instead of $expected.\n"; $fail++; } else { print "PASSED test $test\n"; $pass++; } } print "Passed $pass tests, failed $fail tests, out of a total of " . ( $pass + $fail ) . "\n";