diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-16 02:05:46 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-16 02:05:46 +0000 |
commit | 8f8947a260891f265d4f3881f6ebac7fbbc96d7a (patch) | |
tree | aefc68d6bc2c9e8e3693e420952544cf1515c694 /test/dl | |
parent | 1e7d74f39ed82dc0f1044d30f51237592f1a6131 (diff) |
* ext/dl/method.c: Adding DL::Method as a superclass for DL::Function
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dl')
-rw-r--r-- | test/dl/test_method.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/dl/test_method.rb b/test/dl/test_method.rb new file mode 100644 index 0000000000..e1ed5ed88b --- /dev/null +++ b/test/dl/test_method.rb @@ -0,0 +1,11 @@ +require_relative 'test_base' +require 'dl/func' + +module DL + class TestMethod < TestBase + def test_method_call + f = Method.new(@libc['sinf'], [TYPE_FLOAT], TYPE_FLOAT) + assert_in_delta 1.0, f.call(90 * Math::PI / 180), 0.0001 + end + end +end |