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

ruby-changes:33723

From: nobu <ko1@a...>
Date: Sun, 4 May 2014 08:41:12 +0900 (JST)
Subject: [ruby-changes:33723] nobu:r45804 (trunk): test_math.rb: rename check as assert_float

nobu	2014-05-04 08:41:04 +0900 (Sun, 04 May 2014)

  New Revision: 45804

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

  Log:
    test_math.rb: rename check as assert_float
    
    * test/ruby/test_math.rb (assert_float): rename with `assert_`
      prefix so that the caller frame would appear in backtraces.

  Modified files:
    trunk/test/ruby/test_math.rb
Index: test/ruby/test_math.rb
===================================================================
--- test/ruby/test_math.rb	(revision 45803)
+++ test/ruby/test_math.rb	(revision 45804)
@@ -11,10 +11,11 @@ class TestMath < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_math.rb#L11
     assert_predicate(a, :nan?, *rest)
   end
 
-  def check(a, b)
+  def assert_float(a, b)
     err = [Float::EPSILON * 4, [a.abs, b.abs].max * Float::EPSILON * 256].max
     assert_in_delta(a, b, err)
   end
+  alias check assert_float
 
   def test_atan2
     check(+0.0, Math.atan2(+0.0, +0.0))

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

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