ruby-changes:38745
From: usa <ko1@a...>
Date: Thu, 11 Jun 2015 13:19:37 +0900 (JST)
Subject: [ruby-changes:38745] usa:r50826 (trunk): * test/test_cmath.rb (TestCMath#test_trigonometric_functions): should
usa 2015-06-11 13:19:15 +0900 (Thu, 11 Jun 2015) New Revision: 50826 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50826 Log: * test/test_cmath.rb (TestCMath#test_trigonometric_functions): should not compare float values (in complex values) by `==`. Modified files: trunk/ChangeLog trunk/test/test_cmath.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 50825) +++ ChangeLog (revision 50826) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Jun 11 13:17:34 2015 NAKAMURA Usaku <usa@r...> + + * test/test_cmath.rb (TestCMath#test_trigonometric_functions): should + not compare float values (in complex values) by `==`. + Thu Jun 11 08:52:01 2015 Koichi Sasada <ko1@a...> * method.h: embed rb_method_entry_t::attr::flags (5 bits) into Index: test/test_cmath.rb =================================================================== --- test/test_cmath.rb (revision 50825) +++ test/test_cmath.rb (revision 50826) @@ -23,13 +23,13 @@ class TestCMath < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_cmath.rb#L23 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)) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/