mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 05:55:46 +02:00
add more assertions around moved object
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
243842f68a
commit
c98d1f182d
1 changed files with 8 additions and 1 deletions
|
@ -76,7 +76,14 @@ class TestGCCompact < Test::Unit::TestCase
|
||||||
list_of_objects, addresses, new_tenant = try_to_move_objects
|
list_of_objects, addresses, new_tenant = try_to_move_objects
|
||||||
|
|
||||||
# This is the object that used to be in new_object's position
|
# This is the object that used to be in new_object's position
|
||||||
previous_tenant = list_of_objects[addresses.index(memory_location(new_tenant))]
|
loc = memory_location(new_tenant)
|
||||||
|
assert loc, "should have a memory location"
|
||||||
|
|
||||||
|
address_idx = addresses.index(loc)
|
||||||
|
assert address_idx, "should have an address index"
|
||||||
|
|
||||||
|
previous_tenant = list_of_objects[address_idx]
|
||||||
|
assert previous_tenant, "should have a previous tenant"
|
||||||
|
|
||||||
assert_not_equal previous_tenant.object_id, new_tenant.object_id
|
assert_not_equal previous_tenant.object_id, new_tenant.object_id
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue