[svn:parrot] r41778 - branches/pcc_reapply/t/pmc

dukeleto at svn.parrot.org dukeleto at svn.parrot.org
Fri Oct 9 23:35:07 UTC 2009


Author: dukeleto
Date: Fri Oct  9 23:35:06 2009
New Revision: 41778
URL: https://trac.parrot.org/parrot/changeset/41778

Log:
[t] Add some basic tests for CallSignature attributes

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

Modified: branches/pcc_reapply/t/pmc/callsignature.t
==============================================================================
--- branches/pcc_reapply/t/pmc/callsignature.t	Fri Oct  9 23:15:40 2009	(r41777)
+++ branches/pcc_reapply/t/pmc/callsignature.t	Fri Oct  9 23:35:06 2009	(r41778)
@@ -19,19 +19,42 @@
 .sub main :main
     .include 'test_more.pir'
 
-    plan(1)
+    plan(7)
 
-    instantiate()
+    test_instantiate()
+    test_get_set_attrs()
 .end
 
 
-.sub instantiate
-
+.sub test_instantiate
     $P0 = new ['CallSignature']
     ok(1, 'Instantiated CallSignature')
+.end
 
+.sub test_get_set_attrs
+    $P0 = new ['CallSignature']
+    $P5 = new 'String'
+
+    $P5 = 'foobar'
+    setattribute $P0, 'returns', $P5
+    ok(1, 'set returns attribute')
+    getattribute $P1, $P0, 'returns'
+    is($P1,'foobar', 'got returns attribute')
+
+    $P5 = 'moonbomb'
+    setattribute $P0, 'return_flags', $P5
+    ok(1, 'set return_flags attribute')
+    getattribute $P1, $P0, 'return_flags'
+    is($P5,'moonbomb', 'got return_flags attribute')
+
+    $P5 = 'cheese'
+    setattribute $P0, 'arg_flags', $P5
+    ok(1, 'set arg_flags attribute')
+    getattribute $P1, $P0, 'arg_flags'
+    is($P5,'cheese', 'got arg_flags attribute')
 .end
 
+
 # Local Variables:
 #   mode: pir
 #   fill-column: 100


More information about the parrot-commits mailing list