summaryrefslogtreecommitdiff
path: root/test/dl/test_callback.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/dl/test_callback.rb')
-rw-r--r--test/dl/test_callback.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/dl/test_callback.rb b/test/dl/test_callback.rb
index 458625b3a6..844e8f543a 100644
--- a/test/dl/test_callback.rb
+++ b/test/dl/test_callback.rb
@@ -7,6 +7,17 @@ module DL
class TestCallback < TestBase
include DL
+ def test_remove_callback_failed
+ assert_equal(false, remove_callback(0, TYPE_VOIDP))
+ end
+
+ def test_remove_callback
+ addr = set_callback(TYPE_VOIDP, 1) do |str|
+ str
+ end
+ assert remove_callback(addr, TYPE_VOIDP), 'callback removed'
+ end
+
def test_callback_return_value
addr = set_callback(TYPE_VOIDP, 1) do |str|
str