summaryrefslogtreecommitdiff
path: root/test/dl/test_cfunc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/dl/test_cfunc.rb')
-rw-r--r--test/dl/test_cfunc.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/dl/test_cfunc.rb b/test/dl/test_cfunc.rb
index bd6653ff5d..28501f2c6d 100644
--- a/test/dl/test_cfunc.rb
+++ b/test/dl/test_cfunc.rb
@@ -9,6 +9,15 @@ module DL
@cf = CFunc.new(@libc[@name], TYPE_VOIDP, @name)
end
+ def test_ptr=
+ @cf.ptr = @libc['malloc']
+ assert_equal @cf.ptr, @libc['malloc']
+ end
+
+ def test_ptr
+ assert_equal @cf.ptr, @libc[@name]
+ end
+
def test_set_calltype
@cf.calltype = :foo
assert_equal :foo, @cf.calltype