summaryrefslogtreecommitdiffstats
path: root/test/dl
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-25 00:11:29 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-25 00:11:29 +0000
commitadc30d563b2c211261357376a48f26293212befc (patch)
treea9595fe6abb08abea2b18143557068089e9b0433 /test/dl
parenta6954947faf3ba505ed8169c9b7cdd7e27cd13ab (diff)
downloadruby-adc30d563b2c211261357376a48f26293212befc.tar.gz
ruby-adc30d563b2c211261357376a48f26293212befc.tar.xz
ruby-adc30d563b2c211261357376a48f26293212befc.zip
* ext/dl/handle.c (**) adding documentation
* test/dl/test_handle.rb (**) testing to_i and initialize git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dl')
-rw-r--r--test/dl/test_handle.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/dl/test_handle.rb b/test/dl/test_handle.rb
index ab9c1c13a..a8dcf1952 100644
--- a/test/dl/test_handle.rb
+++ b/test/dl/test_handle.rb
@@ -2,6 +2,11 @@ require 'test_base'
module DL
class TestHandle < TestBase
+ def test_to_i
+ handle = DL::Handle.new(LIBC_SO)
+ assert handle.to_i
+ end
+
def test_static_sym_secure
assert_raises(SecurityError) do
Thread.new do
@@ -90,5 +95,15 @@ module DL
end.join
end
end
+
+ def test_initialize_noargs
+ handle = DL::Handle.new
+ assert handle['rb_str_new']
+ end
+
+ def test_initialize_flags
+ handle = DL::Handle.new(LIBC_SO, DL::RTLD_LAZY | DL::RTLD_GLOBAL)
+ assert handle['calloc']
+ end
end
end