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:
parent
ca7c0fee20
commit
6e34259271
1 changed files with 2 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue