mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_settracefunc.rb: refine
* test/ruby/test_settracefunc.rb (test_isolated_raise_in_trace): check outputs. * test/ruby/test_settracefunc.rb (test_recursive): method name which is internally called by TracePoint is now skipped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2dffc6bba3
commit
b00ba0a957
1 changed files with 4 additions and 7 deletions
|
@ -1040,7 +1040,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_isolated_raise_in_trace
|
def test_isolated_raise_in_trace
|
||||||
bug9088 = '[ruby-dev:47793] [Bug #9088]'
|
bug9088 = '[ruby-dev:47793] [Bug #9088]'
|
||||||
assert_ruby_status([], <<-END, bug9088)
|
assert_in_out_err([], <<-END, [], [], bug9088)
|
||||||
set_trace_func proc {raise rescue nil}
|
set_trace_func proc {raise rescue nil}
|
||||||
1.times {break}
|
1.times {break}
|
||||||
END
|
END
|
||||||
|
@ -1212,16 +1212,13 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_recursive
|
def test_recursive
|
||||||
assert_ruby_status [], %q{
|
assert_in_out_err([], %q{\
|
||||||
stack = []
|
|
||||||
TracePoint.new(:c_call){|tp|
|
TracePoint.new(:c_call){|tp|
|
||||||
p 2
|
p tp.method_id
|
||||||
stack << tp.method_id
|
|
||||||
}.enable{
|
}.enable{
|
||||||
p 1
|
p 1
|
||||||
}
|
}
|
||||||
raise if stack != [:p, :hash, :inspect]
|
}, %w[:p :inspect 1], [], '[Bug #9940]')
|
||||||
}, '[Bug #9940]'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def method_prefix event
|
def method_prefix event
|
||||||
|
|
Loading…
Add table
Reference in a new issue