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

ruby-changes:36504

From: ko1 <ko1@a...>
Date: Wed, 26 Nov 2014 20:00:35 +0900 (JST)
Subject: [ruby-changes:36504] ko1:r48586 (trunk): * test/ruby/test_gc.rb (test_latest_gc_info): do test separately

ko1	2014-11-26 20:00:19 +0900 (Wed, 26 Nov 2014)

  New Revision: 48586

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

  Log:
    * test/ruby/test_gc.rb (test_latest_gc_info): do test separately
      to avoid mysterious behavior.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_gc.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48585)
+++ ChangeLog	(revision 48586)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Nov 26 19:57:54 2014  Koichi Sasada  <ko1@a...>
+
+	* test/ruby/test_gc.rb (test_latest_gc_info): do test separately
+	  to avoid mysterious behavior.
+
 Wed Nov 26 19:54:31 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* win32/win32.c (constat_reset): do nothing on non-standard
Index: test/ruby/test_gc.rb
===================================================================
--- test/ruby/test_gc.rb	(revision 48585)
+++ test/ruby/test_gc.rb	(revision 48586)
@@ -123,10 +123,12 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L123
   end
 
   def test_latest_gc_info
+    assert_separately %w[--disable-gem], __FILE__, __LINE__, <<-'eom'
     GC.start
     count = GC.stat(:heap_free_slots) + GC.stat(:heap_allocatable_pages) * GC::INTERNAL_CONSTANTS[:HEAP_OBJ_LIMIT]
     count.times{ "a" + "b" }
     assert_equal :newobj, GC.latest_gc_info[:gc_by]
+    eom
 
     GC.start
     assert_equal :force, GC.latest_gc_info[:major_by] if use_rgengc?

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

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