April 20, 2013 | Coverage Analysis in Perl: The Basics | Back Next |
"When your code has to make a decision based on the evaluation of an expression, have you tested all possible cases?"
'if/else' block
if ( $something_true ) { # do X } else { # do Y }
Write tests for both 'if' and 'else'
Home Last TOC | Copyright © 2013 James E Keenan | Back Next |