From 3dcda18c13ae8c2e145257b8077600c377a70dd2 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Fri, 6 Nov 2009 22:50:40 +0000 Subject: * ext/dl/cfunc.c (rb_dlcfunc_initialize): cleaning up C macros * ext/dl/cfunc.c (**): adding documentation * test/dl/test_cfunc.rb (test_set_calltype) testing calltype git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/dl/test_cfunc.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/dl') diff --git a/test/dl/test_cfunc.rb b/test/dl/test_cfunc.rb index 3e928257b..bd6653ff5 100644 --- a/test/dl/test_cfunc.rb +++ b/test/dl/test_cfunc.rb @@ -9,6 +9,11 @@ module DL @cf = CFunc.new(@libc[@name], TYPE_VOIDP, @name) end + def test_set_calltype + @cf.calltype = :foo + assert_equal :foo, @cf.calltype + end + def test_new_ptr_type_name assert_equal @name, @cf.name assert @cf.name.tainted?, 'name should be tainted' @@ -47,6 +52,7 @@ module DL def test_to_i assert_equal @cf.to_i, @cf.ptr + assert_equal @libc[@name], @cf.to_i end def test_last_error -- cgit