From 5bf9ac3e9257af5a7bc2b2d95ee0fae4016a9d20 Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 2 Mar 2014 08:44:34 +0000 Subject: Use assert_separately to speed up git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/dl/test_func.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/dl') 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, '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() -- cgit v1.2.3