You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/to_xml.jl
+15
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,7 @@ That is, the results of the top level `TestSet` must all be `AbstractTestSet`s,
120
120
and the results of those `TestSet`s must all be `Results`.
121
121
"""
122
122
functionreport(ts::AbstractTestSet)
123
+
check_ts_structure(ts)
123
124
total_ntests =0
124
125
total_nfails =0
125
126
total_nerrors =0
@@ -142,6 +143,20 @@ function report(ts::AbstractTestSet)
142
143
xdoc
143
144
end
144
145
146
+
"""
147
+
check_ts_structure(ts::AbstractTestSet)
148
+
149
+
Throws an exception if `ts` does not have the right structure for `report`.
150
+
151
+
See also: [`report`](@ref)
152
+
"""
153
+
functioncheck_ts_structure(ts::AbstractTestSet)
154
+
!all(isa.(ts.results, AbstractTestSet)) &&throw(ArgumentError("Results of ts must all be AbstractTestSets. See documentation for `report`."))
155
+
for result in ts.results
156
+
!all(isa.(result.results, Result)) &&throw(ArgumentError("Results of each AbstractTestSet in ts.results must all be Results. See documentation for `report`."))
0 commit comments