[svn:parrot] r41854 - branches/pcc_optimize_sig/t/pmc

allison at svn.parrot.org allison at svn.parrot.org
Wed Oct 14 14:17:40 UTC 2009


Author: allison
Date: Wed Oct 14 14:17:38 2009
New Revision: 41854
URL: https://trac.parrot.org/parrot/changeset/41854

Log:
[pcc] Adding tests for 'exists' opcodes, needed in pcc_reapply branch.

Modified:
   branches/pcc_optimize_sig/t/pmc/callsignature.t

Modified: branches/pcc_optimize_sig/t/pmc/callsignature.t
==============================================================================
--- branches/pcc_optimize_sig/t/pmc/callsignature.t	Wed Oct 14 12:12:43 2009	(r41853)
+++ branches/pcc_optimize_sig/t/pmc/callsignature.t	Wed Oct 14 14:17:38 2009	(r41854)
@@ -19,7 +19,7 @@
 .sub 'main' :main
     .include 'test_more.pir'
 
-    plan(61)
+    plan(63)
 
     test_instantiate()
     test_get_set_attrs()
@@ -28,6 +28,7 @@
     test_indexed_access()
     test_indexed_boxing()
     test_keyed_access()
+    test_exists()
 .end
 
 .sub 'test_instantiate'
@@ -265,6 +266,20 @@
     is( $I0, 4, 'elements after set_*_keyed' )
 .end
 
+.sub 'test_exists'
+    $P0        = new [ 'CallSignature' ]
+
+    $P0[0]     = 111
+    $P0['foo'] = 100
+
+    $I0 = exists $P0[0]
+    is( $I0, 100, 'exists_keyed_int' )
+
+    $I0 = exists $P0['foo']
+    is( $I0, 100, 'exists_keyed_str' )
+
+.end
+
 # Local Variables:
 #   mode: pir
 #   fill-column: 100


More information about the parrot-commits mailing list