summaryrefslogtreecommitdiffstats
path: root/test/dl
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
commit466040cd439fb55cdf285dcc76f89645144f31f3 (patch)
tree759c9b5049bd3f0f4fa29786cc83a4b086c2fb0e /test/dl
parent065fe7a0e98962cad1080084c590a2d24f800db5 (diff)
downloadruby-466040cd439fb55cdf285dcc76f89645144f31f3.tar.gz
ruby-466040cd439fb55cdf285dcc76f89645144f31f3.tar.xz
ruby-466040cd439fb55cdf285dcc76f89645144f31f3.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@25686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dl')
-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 bd6653ff5..28501f2c6 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