pub enum TestOutcome {
Validated(ValidationResult),
CompileError(String),
}Expand description
The overall outcome of a test, combining execution and validation. Either the kernel was validated or failed to compile.
Variants§
Validated(ValidationResult)
The kernel was executed and validation was performed
CompileError(String)
The kernel could not compile
Implementations§
Source§impl TestOutcome
impl TestOutcome
Sourcepub fn enforce(self)
pub fn enforce(self)
Apply the current test mode to this outcome and fail the test if rejected.
Convenience wrapper for decide(self).enforce() — applies the
active test policy (from ruda-test.toml) to this outcome and fails the
test if the decision is Reject.
§Example
ⓘ
let outcome = assert_equals_approx(&actual, &expected, 0.001).as_test_outcome();
outcome.enforce(); // panics if the active policy rejects itTrait Implementations§
Auto Trait Implementations§
impl Freeze for TestOutcome
impl RefUnwindSafe for TestOutcome
impl Send for TestOutcome
impl Sync for TestOutcome
impl Unpin for TestOutcome
impl UnsafeUnpin for TestOutcome
impl UnwindSafe for TestOutcome
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