[svn:parrot] r46469 - trunk/t/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Mon May 10 12:10:08 UTC 2010


Author: bacek
Date: Mon May 10 12:10:07 2010
New Revision: 46469
URL: https://trac.parrot.org/parrot/changeset/46469

Log:
Add regression test for TT#835

Modified:
   trunk/t/pmc/resizablepmcarray.t

Modified: trunk/t/pmc/resizablepmcarray.t
==============================================================================
--- trunk/t/pmc/resizablepmcarray.t	Mon May 10 10:34:28 2010	(r46468)
+++ trunk/t/pmc/resizablepmcarray.t	Mon May 10 12:10:07 2010	(r46469)
@@ -21,7 +21,7 @@
     .include 'fp_equality.pasm'
     .include 'test_more.pir'
 
-    plan(128)
+    plan(129)
 
     resize_tests()
     negative_array_size()
@@ -51,6 +51,7 @@
     addr_tests()
     equality_tests()
     sort_tailcall()
+    push_to_subclasses_array()
 .end
 
 
@@ -1020,6 +1021,22 @@
     .param pmc b
     .tailcall 'cmp_func_tailcall'(a, b)
 .end
+
+# Regression test for TT#835
+.sub 'push_to_subclasses_array'
+    .local pmc cl, array_one
+    cl = subclass "ResizablePMCArray", "ExampleArray"
+    array_one = new "ExampleArray"
+
+    $I0 = 100000
+  loop:
+    array_one.'push'($I0)
+    dec $I0
+    if $I0 goto loop
+
+    ok(1, "Push to subclassed array works")
+.end
+
 # don't forget to change the test plan
 
 # Local Variables:


More information about the parrot-commits mailing list