From 159e6439c0d94d0f2c0dffdfe0d76aad631eb876 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Sun, 25 Oct 2009 00:11:29 +0000 Subject: * ext/dl/handle.c (**) adding documentation * test/dl/test_handle.rb (**) testing to_i and initialize git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/dl/test_handle.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/dl') diff --git a/test/dl/test_handle.rb b/test/dl/test_handle.rb index ab9c1c13a3..a8dcf1952b 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 -- cgit v1.2.3