pub struct TestContext {
pub current_test: Option<String>,
pub current_line: Option<u32>,
pub passes: usize,
pub failures: Vec<TestFailure>,
}Expand description
Test context that tracks assertion results
Fields§
§current_test: Option<String>Current test name being executed
current_line: Option<u32>Source line of the assertion most recently announced by codegen.
Set by patch_seq_test_set_line just before each test.assert*
call; captured into a TestFailure if the assertion fails.
passes: usizeNumber of passed assertions
failures: Vec<TestFailure>Collected failures
Implementations§
Trait Implementations§
Source§impl Debug for TestContext
impl Debug for TestContext
Source§impl Default for TestContext
impl Default for TestContext
Source§fn default() -> TestContext
fn default() -> TestContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TestContext
impl RefUnwindSafe for TestContext
impl Send for TestContext
impl Sync for TestContext
impl Unpin for TestContext
impl UnsafeUnpin for TestContext
impl UnwindSafe for TestContext
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
Mutably borrows from an owned value. Read more