зеркало из https://github.com/github/ruby.git
* test/dl/test_dl2.rb (TestDL#test_sin): math functions do not
work on x86_64 due to the design of DL2. * test/dl/test_func.rb (DL::TestFunc#test_{sinf,sin): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2418e5ca83
Коммит
59064a75b8
|
@ -1,3 +1,10 @@
|
|||
Sun Jan 30 16:15:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* test/dl/test_dl2.rb (TestDL#test_sin): math functions do not
|
||||
work on x86_64 due to the design of DL2.
|
||||
|
||||
* test/dl/test_func.rb (DL::TestFunc#test_{sinf,sin): ditto.
|
||||
|
||||
Sun Jan 30 16:09:22 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* strftime.c (rb_strftime_with_timespec): %G produces 4 digits.
|
||||
|
|
|
@ -95,6 +95,7 @@ class TestDL < TestBase
|
|||
end
|
||||
|
||||
def test_sin
|
||||
return if /x86_64/ =~ RUBY_PLATFORM
|
||||
pi_2 = Math::PI/2
|
||||
cfunc = Function.new(CFunc.new(@libm['sin'], TYPE_DOUBLE, 'sin'),
|
||||
[TYPE_DOUBLE])
|
||||
|
|
|
@ -22,6 +22,7 @@ module DL
|
|||
end
|
||||
|
||||
def test_sinf
|
||||
return if /x86_64/ =~ RUBY_PLATFORM
|
||||
begin
|
||||
f = Function.new(CFunc.new(@libm['sinf'], TYPE_FLOAT, 'sinf'),
|
||||
[TYPE_FLOAT])
|
||||
|
@ -32,6 +33,7 @@ module DL
|
|||
end
|
||||
|
||||
def test_sin
|
||||
return if /x86_64/ =~ RUBY_PLATFORM
|
||||
f = Function.new(CFunc.new(@libm['sin'], TYPE_DOUBLE, 'sin'),
|
||||
[TYPE_DOUBLE])
|
||||
assert_in_delta 1.0, f.call(90 * Math::PI / 180), 0.0001
|
||||
|
|
Загрузка…
Ссылка в новой задаче