File tree 2 files changed +47
-0
lines changed
2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
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
+
1
6
Tue Nov 26 19:29:52 2013 Koichi Sasada <ko1@atdot.net>
2
7
3
8
* common.mk: add useful config "set breakpoint pending on"
Original file line number Diff line number Diff line change @@ -1024,4 +1024,46 @@ def test_isolated_raise_in_trace
1024
1024
1.times {break}
1025
1025
END
1026
1026
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
1027
1069
end
You can’t perform that action at this time.
0 commit comments