File tree 1 file changed +43
-0
lines changed
1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 96
96
@test i1 > 0 && i2 > 0
97
97
@test b1[i1]. line != b2[i2]. line
98
98
end
99
+
100
+ module BackTraceTesting
101
+
102
+ using Base. Test
103
+
104
+ @inline bt2 () = backtrace ()
105
+ @inline bt1 () = bt2 ()
106
+ bt () = bt1 ()
107
+
108
+ lkup = map (StackTraces. lookup, bt ())
109
+ hasbt = hasbt2 = false
110
+ for sfs in lkup
111
+ for sf in sfs
112
+ if sf. func == :bt
113
+ hasbt = true
114
+ end
115
+ if sf. func == :bt2
116
+ hasbt2 = true
117
+ end
118
+ end
119
+ end
120
+ @test hasbt
121
+ @test_broken hasbt2
122
+
123
+ function btmacro ()
124
+ @time backtrace ()
125
+ end
126
+ lkup = map (StackTraces. lookup, btmacro ())
127
+ hasme = hasbtmacro = false
128
+ for sfs in lkup
129
+ for sf in sfs
130
+ if sf. func == Symbol (" macro expansion" )
131
+ hasme = true
132
+ end
133
+ if sf. func == :btmacro
134
+ hasbtmacro = true
135
+ end
136
+ end
137
+ end
138
+ @test hasme
139
+ @test hasbtmacro
140
+
141
+ end
You can’t perform that action at this time.
0 commit comments