diff options
Diffstat (limited to 'test/dl')
-rw-r--r-- | test/dl/test_handle.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/dl/test_handle.rb b/test/dl/test_handle.rb index d46e16c084..fed9da4f85 100644 --- a/test/dl/test_handle.rb +++ b/test/dl/test_handle.rb @@ -2,6 +2,19 @@ require 'test_base' module DL class TestHandle < TestBase + def test_handle_close + handle = DL::Handle.new(LIBC_SO) + assert_equal 0, handle.close + end + + def test_handle_close_twice + handle = DL::Handle.new(LIBC_SO) + handle.close + assert_raises(DL::DLError) do + handle.close + end + end + def test_dlopen_returns_handle assert_instance_of DL::Handle, dlopen(LIBC_SO) end |