summaryrefslogtreecommitdiff
path: root/test/dl
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-02 08:44:34 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-02 08:44:34 +0000
commit5bf9ac3e9257af5a7bc2b2d95ee0fae4016a9d20 (patch)
tree15f551336a2dcba0365349eb206123b201d96393 /test/dl
parent5197ccc3ff5b19a9aa725a1f951bb51734107d8a (diff)
Use assert_separately to speed up
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dl')
-rw-r--r--test/dl/test_func.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/dl/test_func.rb b/test/dl/test_func.rb
index 3b5ad3394f..8cc1eac4a0 100644
--- a/test/dl/test_func.rb
+++ b/test/dl/test_func.rb
@@ -153,12 +153,17 @@ module DL
end
def test_qsort1()
+ assert_separately(%W[--disable=gems -r#{__dir__}/test_base.rb -rdl/func], __FILE__, __LINE__, <<-"end;")
+ include DL
+ @libc = dlopen(LIBC_SO)
+ @libm = dlopen(LIBM_SO)
begin
cb = Function.new(CFunc.new(0, TYPE_INT, '<callback>qsort'),
[TYPE_VOIDP, TYPE_VOIDP]){|x,y| CPtr.new(x)[0] <=> CPtr.new(y)[0]}
qsort = Function.new(CFunc.new(@libc['qsort'], TYPE_VOID, 'qsort'),
[TYPE_VOIDP, TYPE_SIZE_T, TYPE_SIZE_T, TYPE_VOIDP])
buff = "9341"
+
qsort.call(buff, buff.size, 1, cb)
assert_equal("1349", buff)
@@ -169,6 +174,7 @@ module DL
ensure
cb.unbind if cb # max number of callbacks is limited to MAX_CALLBACK
end
+ end;
end
def test_qsort2()