pub struct Output { /* private fields */ }Expand description
Aggregate output of all tests run by this handler.
Implementations§
Source§impl Output
impl Output
Sourcepub fn success(
&mut self,
name: impl AsRef<str>,
mdata: TestMdata,
iters: NonZero<usize>,
timings: Timings,
)
pub fn success( &mut self, name: impl AsRef<str>, mdata: TestMdata, iters: NonZero<usize>, timings: Timings, )
Reports a success and adds it to this run’s Output.
Sourcepub fn failure(
&mut self,
name: impl AsRef<str>,
mdata: Option<TestMdata>,
attempted_iters: Option<NonZero<usize>>,
kind: FailKind,
)
pub fn failure( &mut self, name: impl AsRef<str>, mdata: Option<TestMdata>, attempted_iters: Option<NonZero<usize>>, kind: FailKind, )
Reports a failure and adds it to this run’s Output. If this test was tried
with some number of iterations (i.e. this was not a version mismatch or skipped
test), it should be reported also.
Using the fail!() macro is usually more convenient.
Sourcepub fn merge<'a>(&mut self, other: Self, pref_other: impl Into<Option<&'a str>>)
pub fn merge<'a>(&mut self, other: Self, pref_other: impl Into<Option<&'a str>>)
Merges the output of two runs, appending a prefix to the results of the new run.
To be used in conjunction with Output::blank(), or else only some tests will have
a prefix set.
Sourcepub fn compare_perf(self, baseline: Self) -> PerfReport
pub fn compare_perf(self, baseline: Self) -> PerfReport
Evaluates the performance of self against baseline. The latter is taken
as the comparison point, i.e. a positive resulting PerfReport means that
self performed better.
§Panics
self and baseline are assumed to have the iterations field on all
TestMdatas set to Some(_) if the TestMdata is present itself.