summaryrefslogtreecommitdiff
path: root/test/test_cmath.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-11 04:19:15 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-11 04:19:15 +0000
commitb12540e1eb376c146d87bc03f5277a9f649f1764 (patch)
tree27df6402276ea77dbfb42518c0f8d8c9fa63a8bd /test/test_cmath.rb
parentf0fd30552864c6556427c8d3fd444380b6456d60 (diff)
* test/test_cmath.rb (TestCMath#test_trigonometric_functions): should
not compare float values (in complex values) by `==`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_cmath.rb')
-rw-r--r--test/test_cmath.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_cmath.rb b/test/test_cmath.rb
index c48bb4d..7d18b40 100644
--- a/test/test_cmath.rb
+++ b/test/test_cmath.rb
@@ -23,13 +23,13 @@ class TestCMath < Test::Unit::TestCase
end
def test_trigonometric_functions
- assert_equal CMath.sinh(2).i, CMath.sin(2i)
- assert_equal CMath.cosh(2), CMath.cos(2i)
- assert_equal CMath.tanh(2).i, CMath.tan(2i)
+ assert_in_delta CMath.sinh(2).i, CMath.sin(2i)
+ assert_in_delta CMath.cosh(2), CMath.cos(2i)
+ assert_in_delta CMath.tanh(2).i, CMath.tan(2i)
- assert_equal CMath.sin(2).i, CMath.sinh(2i)
- assert_equal CMath.cos(2), CMath.cosh(2i)
- assert_equal CMath.tan(2).i, CMath.tanh(2i)
+ assert_in_delta CMath.sin(2).i, CMath.sinh(2i)
+ assert_in_delta CMath.cos(2), CMath.cosh(2i)
+ assert_in_delta CMath.tan(2).i, CMath.tanh(2i)
assert_in_delta 1+1i, CMath.sin(CMath.asin(1+1i))
assert_in_delta 1+1i, CMath.cos(CMath.acos(1+1i))