[svn:parrot] r39904 - branches/darwinhints/lib/Parrot/Configure/Options/Test

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Tue Jul 7 02:31:29 UTC 2009


Author: jkeenan
Date: Tue Jul  7 02:31:28 2009
New Revision: 39904
URL: https://trac.parrot.org/parrot/changeset/39904

Log:
Inline comments as to what an internal sub does.

Modified:
   branches/darwinhints/lib/Parrot/Configure/Options/Test/Prepare.pm

Modified: branches/darwinhints/lib/Parrot/Configure/Options/Test/Prepare.pm
==============================================================================
--- branches/darwinhints/lib/Parrot/Configure/Options/Test/Prepare.pm	Tue Jul  7 02:06:00 2009	(r39903)
+++ branches/darwinhints/lib/Parrot/Configure/Options/Test/Prepare.pm	Tue Jul  7 02:31:28 2009	(r39904)
@@ -52,6 +52,41 @@
     return @framework_tests;
 }
 
+# _get_steps_tests() currently returns a ref to a seen-hash of .t files found
+# in t/steps/*.t.  The hash has 4 elements, 'init', 'inter', 'auto' and 'gen'.
+# The value of each such element is another hash where each element
+# corresponds to the (1 or more) tests for each configuration step.  The key
+# of that hash is the second part of the step's name, and its value is a
+# reference to another seen-hash where each element is the 2-digit, 0-padded
+# number of the test.
+#
+#  $steps_tests_ref = {
+#    'auto' => {
+#      ...
+#    },
+#    'gen' => {
+#      ...
+#    },
+#    'inter' => {
+#      'lex' => {
+#        '01' => 1,
+#        '02' => 1,
+#        '03' => 1,
+#      },
+#      ...
+#    },
+#    'init' => {
+#      'manifest' => {
+#        '01' => 1
+#      },
+#      ...
+#      'hints' => {
+#        '01' => 1
+#      },
+#      ...
+#    },
+#  };
+
 sub _get_steps_tests {
     my $steps_dir = shift;
     my %steps_tests = ();
@@ -74,11 +109,10 @@
     my $steps_dir = shift;
     my $steps_tests_ref = shift;
     my $steps_expected_ref = shift;
-    my %steps_tests = %{ $steps_tests_ref };
     my @steps_tests;
     foreach my $step ( @{ $steps_expected_ref } ) {
         my @module_path = split /::/, $step;
-        my $these_tests = $steps_tests{$module_path[0]}{$module_path[1]}
+        my $these_tests = $steps_tests_ref->{$module_path[0]}{$module_path[1]}
             or carp "No tests exist for configure step $step";
         foreach my $k (sort keys %$these_tests) {
             push @steps_tests, qq{$steps_dir/$module_path[0]_$module_path[1]-$k.t};


More information about the parrot-commits mailing list