Author: jkeenan
Date: Sun Dec 7 10:09:36 2008
New Revision: 33622
Modified:
branches/testparrottest/lib/Parrot/Test.pm
Log:
Restructure an if-elsif block to make syntax more readable.
Modified: branches/testparrottest/lib/Parrot/Test.pm
==============================================================================
--- branches/testparrottest/lib/Parrot/Test.pm (original)
+++ branches/testparrottest/lib/Parrot/Test.pm Sun Dec 7 10:09:36 2008
@@ -213,16 +213,15 @@
\$extra{todo}
if defined $extra{todo};
- if ( $func =~ /_error_/ and not $exit_code ) {
- return _handle_error_output( $builder, $real_output,
$expected, $desc );
- }
- elsif ($exit_code) {
+ if ($exit_code) {
$builder->ok( 0, $desc );
$builder->diag( "Exited with error code: $exit_code\n"
. "Received:\n$real_output\nExpected:\n$expected\n" );
-
return 0;
}
+ if ( $func =~ /_error_/ ) {
+ return _handle_error_output( $builder, $real_output,
$expected, $desc );
+ }
my $pass = $builder->$meth( $real_output, $expected, $desc );
$builder->diag("'$cmd' failed with exit code $exit_code")
if not $pass and $exit_code;