develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33620 - branches/testparrottest/lib/Parrot

From:
jkeenan
Date:
December 7, 2008 09:56
Subject:
[svn:parrot] r33620 - branches/testparrottest/lib/Parrot
Message ID:
20081207175639.10C2FCB9AF@x12.develooper.com
Author: jkeenan
Date: Sun Dec  7 09:56:38 2008
New Revision: 33620

Modified:
   branches/testparrottest/lib/Parrot/Test.pm

Log:
Change some inline comments to reduce confusion.  Use identical syntax where possible.

Modified: branches/testparrottest/lib/Parrot/Test.pm
==============================================================================
--- branches/testparrottest/lib/Parrot/Test.pm	(original)
+++ branches/testparrottest/lib/Parrot/Test.pm	Sun Dec  7 09:56:38 2008
@@ -47,7 +47,7 @@
 sub run_command {
     my ( $command, %options ) = @_;
 
-    my ( $out, $err, $chdir ) = _handle_test_options( \%options );;
+    my ( $out, $err, $chdir ) = _handle_test_options( \%options );
 
     if ($PConfig{parrot_is_shared}) {
         _handle_blib_path();
@@ -174,7 +174,7 @@
     my $pirc           = File::Spec->join( File::Spec->curdir(),
                             qw( compilers pirc ), "pirc$PConfig{exe}" );
 
-    ##### A: Parrot test map #####
+    ##### 1: Parrot test map #####
     my %parrot_test_map = map {
         $_ . '_output_is'           => 'is_eq',
         $_ . '_error_output_is'     => 'is_eq',
@@ -224,8 +224,6 @@
 
                 return 0;
             }
-
-#print STDERR 'just before $pass:  ', "$desc\n";
             my $pass = $builder->$meth( $real_output, $expected, $desc );
             $builder->diag("'$cmd' failed with exit code $exit_code")
                 if not $pass and $exit_code;
@@ -238,7 +236,7 @@
         *{ $package . '::' . $func } = $test_sub;
     }
 
-    ##### B: PIR-to-PASM test map #####
+    ##### 2: PIR-to-PASM test map #####
     my %pir_2_pasm_test_map = (
         pir_2_pasm_is      => 'is_eq',
         pir_2_pasm_isnt    => 'isnt_eq',
@@ -322,9 +320,7 @@
             $builder->diag("'$cmd' failed with exit code $exit_code")
                 if $exit_code and not $pass;
 
-            if ( !$ENV{POSTMORTEM} ) {
-                unlink $out_f;
-            }
+            unlink $out_f unless $ENV{POSTMORTEM};
 
             return $pass;
         };
@@ -334,7 +330,7 @@
         *{ $package . '::' . $func } = $test_sub;
     }
 
-    ##### C: Language test map #####
+    ##### 3: Language test map #####
     my %builtin_language_prefix = (
         PIR_IMCC  => 'pir',
         PASM_IMCC => 'pasm',
@@ -400,7 +396,7 @@
         *{ $package . '::' . $func } = $test_sub;
     }
 
-    ##### D:  Example test map #####
+    ##### 4:  Example test map #####
     my %example_test_map = (
         example_output_is   => 'language_output_is',
         example_output_like => 'language_output_like',
@@ -447,7 +443,7 @@
         *{ $package . '::' . $func } = $test_sub;
     }
 
-    ##### E: C test map #####
+    ##### 5: C test map #####
     my %c_test_map = (
         c_output_is     => 'is_eq',
         c_output_isnt   => 'isnt_eq',



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About