mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_settracefunc.rb (test_tracepoint):
remove unused test case. (this test case is redefined by newer tests) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2f9f17ac98
commit
b1ad79774d
2 changed files with 6 additions and 53 deletions
|
@ -1,3 +1,9 @@
|
|||
Thu Oct 4 18:59:14 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* test/ruby/test_settracefunc.rb (test_tracepoint):
|
||||
remove unused test case.
|
||||
(this test case is redefined by newer tests)
|
||||
|
||||
Thu Oct 4 17:24:51 2012 Narihiro Nakamura <authornari@gmail.com>
|
||||
|
||||
* gc.c (rb_objspace_call_finalizer): call gc_mark_stacked_objects
|
||||
|
|
|
@ -398,59 +398,6 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
|||
define_method(:method_added, Module.method(:method_added))
|
||||
end
|
||||
|
||||
def test_tracepoint
|
||||
events = []
|
||||
trace = nil
|
||||
xyzzy = nil
|
||||
local_var = :outer
|
||||
eval <<-EOF.gsub(/^.*?: /, ""), nil, 'xyzzy'
|
||||
1: trace = TracePoint.trace(){|tp|
|
||||
2: events << [tp.event, tp.line, tp.file, tp.klass, tp.id, tp.self, tp.binding.eval("local_var")]
|
||||
3: }
|
||||
4: 1.times{|;local_var| local_var = :inner
|
||||
5: tap{}
|
||||
6: }
|
||||
7: class XYZZY
|
||||
8: local_var = :XYZZY_outer
|
||||
9: def foo
|
||||
10: local_var = :XYZZY_foo
|
||||
11: bar
|
||||
12: end
|
||||
13: def bar
|
||||
14: local_var = :XYZZY_bar
|
||||
15: tap{}
|
||||
16: end
|
||||
17: end
|
||||
18: xyzzy = XYZZY.new
|
||||
19: xyzzy.foo
|
||||
20: trace.untrace
|
||||
EOF
|
||||
|
||||
events.each{|ev|
|
||||
STDERR.puts [ev[0], ev[1]].inspect
|
||||
STDERR.puts ev.inspect
|
||||
}
|
||||
|
||||
[
|
||||
#
|
||||
[:c_return, 1, "xyzzy", self.class, :trace, TracePoint, :outer],
|
||||
[:line, 4, 'xyzzy', self.class, :test_tracepoint, self, :outer],
|
||||
[:c_call, 4, 'xyzzy', Integer, :times, 1, :outer],
|
||||
[:line, 4, 'xyzzy', self.class, :test_tracepoint, self, nil],
|
||||
[:line, 5, 'xyzzy', self.class, :test_tracepoint, self, :inner],
|
||||
[:c_call, 5, 'xyzzy', Kernel, :tap, self, :inner],
|
||||
[:line, 7, 'xyzzy', self.class, :test_tracepoint, self, :outer],
|
||||
[:c_call, 7, "xyzzy", Class, :new, TestSetTraceFunc::XYZZY, :outer],
|
||||
[:c_call, 7, "xyzzy", BasicObject, :initialize, xyzzy, :outer],
|
||||
[:line, 8, 'xyzzy', self.class, :test_tracepoint, self, :outer],
|
||||
[:c_call, 9, 'xyzzy', TracePoint, :untrace, trace,:outer],
|
||||
].each{|e|
|
||||
assert_equal e, events.shift
|
||||
}
|
||||
assert_equal [], events
|
||||
end
|
||||
|
||||
|
||||
def trace_by_tracepoint *trace_events
|
||||
events = []
|
||||
trace = nil
|
||||
|
|
Loading…
Reference in a new issue