[前][次][番号順一覧][スレッド一覧]

ruby-changes:55279

From: tenderlove <ko1@a...>
Date: Wed, 10 Apr 2019 08:23:39 +0900 (JST)
Subject: [ruby-changes:55279] tenderlove:r67486 (trunk): Don't fail the build if we can't get objects to move

tenderlove	2019-04-10 08:23:33 +0900 (Wed, 10 Apr 2019)

  New Revision: 67486

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67486

  Log:
    Don't fail the build if we can't get objects to move

  Modified files:
    trunk/test/ruby/test_gc_compact.rb
Index: test/ruby/test_gc_compact.rb
===================================================================
--- test/ruby/test_gc_compact.rb	(revision 67485)
+++ test/ruby/test_gc_compact.rb	(revision 67486)
@@ -57,7 +57,9 @@ class TestGCCompact < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc_compact.rb#L57
     GC.compact
 
     # Some should have moved
-    assert_operator assert_object_ids(list_of_objects), :>, 0
+    id_count = assert_object_ids(list_of_objects)
+    skip "couldn't get objects to move" if id_count == 0
+    assert_operator id_count, :>, 0
 
     new_ids = list_of_objects.map(&:object_id)
 
@@ -94,6 +96,8 @@ class TestGCCompact < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc_compact.rb#L96
       find_object_in_recycled_slot(addresses)
     }
 
-    assert_operator GC.stat(:object_id_collisions), :>, 0
+    collisions = GC.stat(:object_id_collisions)
+    skip "couldn't get objects to collide" if collisions == 0
+    assert_operator collisions, :>, 0
   end
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]