summaryrefslogtreecommitdiff
path: root/test/dl
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-30 07:15:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-30 07:15:23 +0000
commit59064a75b8ae4d19fcbbe3bf2b9fdcb9849de33b (patch)
treebcf4de8217c119ef34fd90f9e84305c3b73df285 /test/dl
parent2418e5ca83f863b58a9e13caefc9a23414cae49c (diff)
* 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
Diffstat (limited to 'test/dl')
-rw-r--r--test/dl/test_dl2.rb1
-rw-r--r--test/dl/test_func.rb2
2 files changed, 3 insertions, 0 deletions
diff --git a/test/dl/test_dl2.rb b/test/dl/test_dl2.rb
index 431c5b2..1d6e391 100644
--- a/test/dl/test_dl2.rb
+++ b/test/dl/test_dl2.rb
@@ -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])
diff --git a/test/dl/test_func.rb b/test/dl/test_func.rb
index d438f94..27bf7da 100644
--- a/test/dl/test_func.rb
+++ b/test/dl/test_func.rb
@@ -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