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

ruby-changes:43366

From: nobu <ko1@a...>
Date: Sat, 18 Jun 2016 13:50:19 +0900 (JST)
Subject: [ruby-changes:43366] nobu:r55440 (trunk): Refine test of r55432

nobu	2016-06-18 13:50:14 +0900 (Sat, 18 Jun 2016)

  New Revision: 55440

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

  Log:
    Refine test of r55432
    
    * test/stringio/test_stringio.rb (test_overflow): could occur only
      on sizeof(long) >= sizeof(void*).

  Modified files:
    trunk/test/stringio/test_stringio.rb
Index: test/stringio/test_stringio.rb
===================================================================
--- test/stringio/test_stringio.rb	(revision 55439)
+++ test/stringio/test_stringio.rb	(revision 55440)
@@ -682,7 +682,8 @@ class TestStringIO < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/stringio/test_stringio.rb#L682
   end
 
   def test_overflow
-    limit = (1 << (RbConfig::SIZEOF["size_t"]*8-1)) - 0x10
+    skip if RbConfig::SIZEOF["void*"] > RbConfig::SIZEOF["long"]
+    limit = (1 << (RbConfig::SIZEOF["void*"]*8-1)) - 0x10
     assert_separately(%w[-rstringio], "#{<<-"begin;"}\n#{<<-"end;"}")
     begin;
       limit = #{limit}

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

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