Skip to content

Commit a4b0c3c

Browse files
committed
* test/ruby/test_settracefunc.rb: add tests for a_call/a_return
by Brandur <brandur@mutelight.org> [Feature ruby#9120] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent be26a37 commit a4b0c3c

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Tue Nov 26 20:02:39 2013 Koichi Sasada <ko1@atdot.net>
2+
3+
* test/ruby/test_settracefunc.rb: add tests for a_call/a_return
4+
by Brandur <brandur@mutelight.org> [Feature #9120]
5+
16
Tue Nov 26 19:29:52 2013 Koichi Sasada <ko1@atdot.net>
27

38
* common.mk: add useful config "set breakpoint pending on"

test/ruby/test_settracefunc.rb

+42
Original file line numberDiff line numberDiff line change
@@ -1024,4 +1024,46 @@ def test_isolated_raise_in_trace
10241024
1.times {break}
10251025
END
10261026
end
1027+
1028+
def test_a_call
1029+
events = []
1030+
TracePoint.new(:a_call){|tp|
1031+
events << tp.event
1032+
}.enable{
1033+
1.times{
1034+
3
1035+
}
1036+
method_for_test_tracepoint_block{
1037+
4
1038+
}
1039+
}
1040+
assert_equal([
1041+
:b_call,
1042+
:c_call,
1043+
:b_call,
1044+
:call,
1045+
:b_call,
1046+
], events)
1047+
end
1048+
1049+
def test_a_return
1050+
events = []
1051+
TracePoint.new(:a_return){|tp|
1052+
events << tp.event
1053+
}.enable{
1054+
1.times{
1055+
3
1056+
}
1057+
method_for_test_tracepoint_block{
1058+
4
1059+
}
1060+
}
1061+
assert_equal([
1062+
:b_return,
1063+
:c_return,
1064+
:b_return,
1065+
:return,
1066+
:b_return
1067+
], events)
1068+
end
10271069
end

0 commit comments

Comments
 (0)