diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-03 23:41:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-03 23:41:04 +0000 |
commit | 6e34259271c705b3d8bb300b5374addb51dce5a0 (patch) | |
tree | 1ca04a842999c2e7cfc4c15ebf52a6431ad9fff2 /test/ruby/test_math.rb | |
parent | ca7c0fee20ac83044c9db471c26e3a78b0275699 (diff) | |
download | ruby-6e34259271c705b3d8bb300b5374addb51dce5a0.tar.gz |
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
Diffstat (limited to 'test/ruby/test_math.rb')
-rw-r--r-- | test/ruby/test_math.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb index 3383079cc7..2eaea6cf37 100644 --- a/test/ruby/test_math.rb +++ b/test/ruby/test_math.rb @@ -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)) |