From 466040cd439fb55cdf285dcc76f89645144f31f3 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Sun, 8 Nov 2009 00:21:41 +0000 Subject: * 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 --- test/dl/test_cfunc.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/dl') 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 -- cgit