[svn:parrot] r38234 - trunk/t/pmc
pmichaud at svn.parrot.org
pmichaud at svn.parrot.org
Mon Apr 20 17:20:03 UTC 2009
Author: pmichaud
Date: Mon Apr 20 17:20:02 2009
New Revision: 38234
URL: https://trac.parrot.org/parrot/changeset/38234
Log:
Tests for RPA and commits 38233 (revert of 38277).
Modified:
trunk/t/pmc/resizablepmcarray.t
Modified: trunk/t/pmc/resizablepmcarray.t
==============================================================================
--- trunk/t/pmc/resizablepmcarray.t Mon Apr 20 17:16:40 2009 (r38233)
+++ trunk/t/pmc/resizablepmcarray.t Mon Apr 20 17:20:02 2009 (r38234)
@@ -21,7 +21,7 @@
.include 'fp_equality.pasm'
.include 'test_more.pir'
- plan(118)
+ plan(121)
resize_tests()
negative_array_size()
@@ -47,6 +47,7 @@
iterate_subclass_of_rpa()
method_forms_of_unshift_etc()
sort_with_broken_cmp()
+ addr_tests()
.end
@@ -895,6 +896,23 @@
.return ($I0)
.end
+.sub 'addr_tests'
+ $P0 = new 'ResizablePMCArray'
+ $I0 = get_addr $P0
+ $P1 = new 'ResizablePMCArray'
+ $I1 = get_addr $P1
+
+ $I2 = $I0 != 0
+ ok($I2, 'ResizablePMCArray address is not zero')
+ $I2 = $I0 != $I1
+ ok($I2, 'Two empty RPAs do not have same address')
+
+ push $P0, 3
+ $I1 = get_addr $P0
+ is($I0, $I1, 'Adding element to RPA keeps same addr')
+.end
+
+
# don't forget to change the test plan
# Local Variables:
More information about the parrot-commits
mailing list