1 # -*- encoding: binary -*-
5 class TestRaindropsGc < Test::Unit::TestCase
7 # we may need to create more garbage as GC may be less aggressive
8 # about expiring things. This is completely unrealistic code,
11 assert_nothing_raised do
12 1000000.times { |i| Raindrops.new(24); [] }
24 _, status = Process.waitpid2(pid)
25 assert status.success?
26 assert_equal [ 0, 0 ], tmp.to_ary
28 assert_equal [ 0, 1 ], tmp.to_ary
31 exit([ 0, 2 ] == tmp.to_ary)
33 _, status = Process.waitpid2(pid)
34 assert status.success?
35 assert_equal [ 0, 2 ], tmp.to_ary
37 end if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" &&
38 ENV["STRESS"].to_i != 0