From 8f8947a260891f265d4f3881f6ebac7fbbc96d7a Mon Sep 17 00:00:00 2001 From: tenderlove Date: Tue, 16 Feb 2010 02:05:46 +0000 Subject: * 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 --- test/dl/test_method.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/dl/test_method.rb (limited to 'test/dl') 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 -- cgit v1.2.3