summaryrefslogtreecommitdiff
path: root/test/dl/test_method.rb
blob: e1ed5ed88b8f60cf5c615141bd429319f439bd5a (plain)
1
2
3
4
5
6
7
8
9
10
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