1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-05-03 23:41:04 +00:00
parent ca7c0fee20
commit 6e34259271

View file

@ -11,10 +11,11 @@ class TestMath < Test::Unit::TestCase
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))