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

ruby-changes:15266

From: naruse <ko1@a...>
Date: Thu, 1 Apr 2010 17:44:11 +0900 (JST)
Subject: [ruby-changes:15266] Ruby:r27150 (trunk): Remove hexadecimal-floating-point tests for String#to_f.

naruse	2010-04-01 17:43:56 +0900 (Thu, 01 Apr 2010)

  New Revision: 27150

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

  Log:
    Remove hexadecimal-floating-point tests for String#to_f.

  Modified files:
    trunk/test/ruby/test_string.rb

Index: test/ruby/test_string.rb
===================================================================
--- test/ruby/test_string.rb	(revision 27149)
+++ test/ruby/test_string.rb	(revision 27150)
@@ -1396,16 +1396,6 @@
     assert_equal(0.0,       S("degrees 100.0").to_f)
     assert_equal([ 0.0].pack('G'), [S(" 0.0").to_f].pack('G'))
     assert_equal([-0.0].pack('G'), [S("-0.0").to_f].pack('G'))
-    assert_equal([ 0.0].pack('G'), [S(" 0x0p+0").to_f].pack('G'))
-    assert_equal([-0.0].pack('G'), [S("-0x0p+0").to_f].pack('G'))
-    assert_equal(255.0,     S("0Xff").to_f)
-    assert_equal(255.5,     S("0Xff.8").to_f)
-    assert_equal(1.0,       S("0X1.P+0").to_f)
-    assert_equal(1024.0,    S("0x1p10").to_f)
-    assert_equal(1024.0,    S("0x1p+10").to_f)
-    assert_equal(0.0009765625, S("0x1p-10").to_f)
-    assert_equal(2.6881171418161356e+43, S("0x1.3494a9b171bf5p+144").to_f)
-    assert_equal(-3.720075976020836e-44, S("-0x1.a8c1f14e2af5dp-145").to_f)
   end
 
   def test_to_i

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

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