pub struct FileReport {
pub path: PathBuf,
pub check: CheckInfo,
pub error: Option<String>,
pub passed: usize,
pub failed: usize,
pub failures: Vec<String>,
pub file_level: bool,
pub tests: Vec<TestResult>,
pub duration_ms: f64,
pub snapshots_written: Vec<String>,
pub snapshots_updated: Vec<String>,
pub coverage: Vec<(String, Vec<usize>)>,
}Expand description
Outcome of one test file.
Fields§
§path: PathBufThe test file this is about, as it was discovered or named on the command line.
check: CheckInfoWhat checking it found. A file that does not type-check still gets a report — with this carrying the errors and no tests below it — rather than being dropped, so a run says which files it could not get to.
error: Option<String>Runtime error outside any test (e.g. the file itself raised).
passed: usizeTests the library reported as passing.
failed: usizeTests it reported as failing. ok is false while this is non-zero, and the run’s
exit code is the sum of it over every file.
failures: Vec<String>One message per failure, already formatted by the library — the runner owns no assertion and so has nothing of its own to say about why one failed.
file_level: booltrue when no test library was used and the verdict is file-level.
tests: Vec<TestResult>Per-test outcomes when the library reports them (htl.test does).
duration_ms: f64Wall time for the whole file: check, load, and every test.
snapshots_written: Vec<String>Snapshot files created on this run (first to_match_snapshot of a name).
snapshots_updated: Vec<String>Snapshot files rewritten because update_snapshots was set.
coverage: Vec<(String, Vec<usize>)>With coverage: (chunk source as Lua names it, executed lines).
Implementations§
Trait Implementations§
Source§impl Clone for FileReport
impl Clone for FileReport
Source§fn clone(&self) -> FileReport
fn clone(&self) -> FileReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FileReport
impl Debug for FileReport
Source§impl Default for FileReport
impl Default for FileReport
Source§fn default() -> FileReport
fn default() -> FileReport
Auto Trait Implementations§
impl Freeze for FileReport
impl RefUnwindSafe for FileReport
impl Send for FileReport
impl Sync for FileReport
impl Unpin for FileReport
impl UnsafeUnpin for FileReport
impl UnwindSafe for FileReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more