зеркало из https://github.com/github/ruby.git
The test for TracePoint#raised_exception had never worked correctly
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2881a6d412
Коммит
fcdabb50b8
|
@ -729,13 +729,13 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_tracepoint_raised_exception
|
||||
trace = TracePoint.new(:call, :return){|tp|
|
||||
trace = TracePoint.new(:call, :return, :raise){|tp|
|
||||
next if !target_thread?
|
||||
case tp.event
|
||||
when :call, :return
|
||||
assert_raise(RuntimeError) { tp.raised_exception }
|
||||
when :raise
|
||||
assert_equal(XYZZYError, tp.raised_exception)
|
||||
assert_kind_of(XYZZYException, tp.raised_exception)
|
||||
end
|
||||
}
|
||||
trace.enable{
|
||||
|
|
Загрузка…
Ссылка в новой задаче