mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00

(Test_ThreadSwitch#test_threadswitch_init): This test does not pass because the hook method actually calls rb_add_event_hook() which does not emit a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@37221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
16 lines
450 B
Ruby
16 lines
450 B
Ruby
require 'test/unit'
|
|
require '-test-/threadswitch/event_hook'
|
|
require 'ruby/envutil'
|
|
|
|
class Test_ThreadSwitch < Test::Unit::TestCase
|
|
def test_threadswitch_init
|
|
threads = []
|
|
warning = EnvUtil.verbose_warning {
|
|
EventHook::ThreadSwitch.hook {|name, thread|
|
|
threads << thread if name == "thread-init"
|
|
}
|
|
}
|
|
#assert_match(/not an official API/, warning)
|
|
assert_operator(threads, :include?, Thread.current)
|
|
end
|
|
end
|