mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/dl/test_func.rb (test_sinf): sinf() doesn't exist in the standard of C.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
55400cb80f
commit
ec21e8438c
1 changed files with 6 additions and 2 deletions
|
@ -22,8 +22,12 @@ module DL
|
|||
end
|
||||
|
||||
def test_sinf
|
||||
f = Function.new(CFunc.new(@libm['sinf'], TYPE_FLOAT, 'sinf'),
|
||||
[TYPE_FLOAT])
|
||||
begin
|
||||
f = Function.new(CFunc.new(@libm['sinf'], TYPE_FLOAT, 'sinf'),
|
||||
[TYPE_FLOAT])
|
||||
rescue DL::DLError
|
||||
skip "libm may not have sinf()"
|
||||
end
|
||||
assert_in_delta 1.0, f.call(90 * Math::PI / 180), 0.0001
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue