summaryrefslogtreecommitdiffstats
path: root/test/dl
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-06 22:50:40 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-06 22:50:40 +0000
commit3dcda18c13ae8c2e145257b8077600c377a70dd2 (patch)
treeae27b67dc80039ad1658b5765e71d2d821fbabdf /test/dl
parent90e410088e44ff0239ffd8c990f085d74a1a2b5c (diff)
downloadruby-3dcda18c13ae8c2e145257b8077600c377a70dd2.tar.gz
ruby-3dcda18c13ae8c2e145257b8077600c377a70dd2.tar.xz
ruby-3dcda18c13ae8c2e145257b8077600c377a70dd2.zip
* 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
Diffstat (limited to 'test/dl')
-rw-r--r--test/dl/test_cfunc.rb6
1 files changed, 6 insertions, 0 deletions
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