[svn:parrot] r47346 - in branches/gsoc_past_optimization: runtime/parrot/library/PAST t/library

tcurtis at svn.parrot.org tcurtis at svn.parrot.org
Thu Jun 3 23:41:03 UTC 2010


Author: tcurtis
Date: Thu Jun  3 23:41:02 2010
New Revision: 47346
URL: https://trac.parrot.org/parrot/changeset/47346

Log:
PAST::Pattern::Val tests for attributes matching exactly pass.

Modified:
   branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.nqp
   branches/gsoc_past_optimization/t/library/pastpattern.t

Modified: branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.nqp
==============================================================================
--- branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.nqp	Thu Jun  3 23:32:29 2010	(r47345)
+++ branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.nqp	Thu Jun  3 23:41:02 2010	(r47346)
@@ -219,7 +219,8 @@
 
     method ACCEPTS ($node) {
         ($node ~~ PAST::Val
-         && PAST::Pattern::check_node_attributes(self, $node));
+         && PAST::Pattern::check_node_attributes(self, $node)
+         && PAST::Pattern::check_attribute(self, $node, "value"));
     }
 }
 

Modified: branches/gsoc_past_optimization/t/library/pastpattern.t
==============================================================================
--- branches/gsoc_past_optimization/t/library/pastpattern.t	Thu Jun  3 23:32:29 2010	(r47345)
+++ branches/gsoc_past_optimization/t/library/pastpattern.t	Thu Jun  3 23:41:02 2010	(r47346)
@@ -5,7 +5,7 @@
 pir::load_bytecode('PCT.pbc');
 pir::load_bytecode('PAST/Pattern.pbc');
 
-plan(629);
+plan(637);
 
 test_type_matching();
 test_attribute_exact_matching();
@@ -94,6 +94,7 @@
     test_attribute_exact_matching_node_attributes();
     test_attribute_exact_matching_block_attributes();
     test_attribute_exact_matching_op_attributes();
+    test_attribute_exact_matching_val_attributes();
 }
 
 sub test_attribute_exact_matching_node_attributes () {
@@ -245,6 +246,12 @@
                                                   $attr);
 }
 
+sub test_attribute_exact_matching_val_attributes () {
+    test_attribute_exact_matching_on_subtype_attr(PAST::Val,
+                                                  PAST::Pattern::Val,
+                                                  "value");
+}
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4


More information about the parrot-commits mailing list