summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-08 00:21:41 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-08 00:21:41 +0000
commit5de564634df7b97c4004b152f40008938c638dcc (patch)
tree759c9b5049bd3f0f4fa29786cc83a4b086c2fb0e /test
parent355a7bc3a552fda0fb1d1988bc3b2d600685f831 (diff)
* ext/dl/cfunc.c (**) updating documentation
* test/dl/test_cfunc.rb (test_ptr=, test_ptr) testing the pointer accessor methods on CFunc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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