Skip to content

Commit

Permalink
Tests for RPA and commits 38233 (revert of 38277).
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@38234 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
pmichaud committed Apr 20, 2009
1 parent 6f931e1 commit 41e0470
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion t/pmc/resizablepmcarray.t
Expand Up @@ -21,7 +21,7 @@ out-of-bounds test. Checks INT and PMC keys.
.include 'fp_equality.pasm'
.include 'test_more.pir'

plan(118)
plan(121)

resize_tests()
negative_array_size()
Expand All @@ -47,6 +47,7 @@ out-of-bounds test. Checks INT and PMC keys.
iterate_subclass_of_rpa()
method_forms_of_unshift_etc()
sort_with_broken_cmp()
addr_tests()
.end


Expand Down Expand Up @@ -895,6 +896,23 @@ end:
.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:
Expand Down

0 comments on commit 41e0470

Please sign in to comment.