mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
2881a6d412
commit
fcdabb50b8
1 changed files with 2 additions and 2 deletions
|
@ -729,13 +729,13 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_tracepoint_raised_exception
|
def test_tracepoint_raised_exception
|
||||||
trace = TracePoint.new(:call, :return){|tp|
|
trace = TracePoint.new(:call, :return, :raise){|tp|
|
||||||
next if !target_thread?
|
next if !target_thread?
|
||||||
case tp.event
|
case tp.event
|
||||||
when :call, :return
|
when :call, :return
|
||||||
assert_raise(RuntimeError) { tp.raised_exception }
|
assert_raise(RuntimeError) { tp.raised_exception }
|
||||||
when :raise
|
when :raise
|
||||||
assert_equal(XYZZYError, tp.raised_exception)
|
assert_kind_of(XYZZYException, tp.raised_exception)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
trace.enable{
|
trace.enable{
|
||||||
|
|
Loading…
Reference in a new issue