summaryrefslogtreecommitdiff
path: root/test/dl/test_method.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/dl/test_method.rb')
-rw-r--r--test/dl/test_method.rb11
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