[svn:parrot] r41706 - branches/pcc_reapply/t/op
allison at svn.parrot.org
allison at svn.parrot.org
Sun Oct 4 18:34:45 UTC 2009
Author: allison
Date: Sun Oct 4 18:34:45 2009
New Revision: 41706
URL: https://trac.parrot.org/parrot/changeset/41706
Log:
[pcc] PIR test for slurpy named arguments.
Modified:
branches/pcc_reapply/t/op/calling.t
Modified: branches/pcc_reapply/t/op/calling.t
==============================================================================
--- branches/pcc_reapply/t/op/calling.t Sun Oct 4 18:34:08 2009 (r41705)
+++ branches/pcc_reapply/t/op/calling.t Sun Oct 4 18:34:45 2009 (r41706)
@@ -7,7 +7,7 @@
use lib qw( . lib ../lib ../../lib );
use Test::More;
-use Parrot::Test tests => 94;
+use Parrot::Test tests => 95;
=head1 NAME
@@ -1751,6 +1751,36 @@
ok
OUTPUT
+pir_output_is( <<'CODE', <<'OUTPUT', "named - 3 slurpy hash PIR" );
+.sub main :main
+ foo('a' => 10 , 'b' => 20, 'c' => 30)
+ print "ok\n"
+ end
+.end
+.sub foo
+ .param int a :named('a')
+ .param pmc bar :slurpy :named
+ print a
+ print ' '
+ elements $I1, bar
+ print $I1
+ print ' '
+ typeof $S0, bar
+ print $S0
+ print ' '
+ set $I2, bar['b']
+ print $I2
+ print ' '
+ set $I2, bar['c']
+ print $I2
+ print "\n"
+.end
+
+CODE
+10 2 Hash 20 30
+ok
+OUTPUT
+
pasm_output_is( <<'CODE', <<'OUTPUT', "named - 3 slurpy hash" );
.pcc_sub main:
set_args "0x200, 0, 0x200, 0,0x200, 0", "a", 10, "b", 20, 'c', 30
More information about the parrot-commits
mailing list