pub struct TestScenario {
pub name: String,
pub description: String,
pub spec: ProblemSpec,
pub expected: ExpectedOutcome,
}Expand description
Test scenario for a pack
Fields§
§name: StringScenario name
description: StringDescription of what’s being tested
spec: ProblemSpecProblem specification for this scenario
expected: ExpectedOutcomeExpected outcome
Implementations§
Source§impl TestScenario
impl TestScenario
Sourcepub fn new(
name: impl Into<String>,
description: impl Into<String>,
spec: ProblemSpec,
expected: ExpectedOutcome,
) -> Self
pub fn new( name: impl Into<String>, description: impl Into<String>, spec: ProblemSpec, expected: ExpectedOutcome, ) -> Self
Create a new test scenario
Sourcepub fn feasible(
name: impl Into<String>,
description: impl Into<String>,
spec: ProblemSpec,
min_confidence: f64,
) -> Self
pub fn feasible( name: impl Into<String>, description: impl Into<String>, spec: ProblemSpec, min_confidence: f64, ) -> Self
Create a feasibility test (expects solution)
Sourcepub fn infeasible(
name: impl Into<String>,
description: impl Into<String>,
spec: ProblemSpec,
expected_violations: Vec<String>,
) -> Self
pub fn infeasible( name: impl Into<String>, description: impl Into<String>, spec: ProblemSpec, expected_violations: Vec<String>, ) -> Self
Create an infeasibility test (expects no solution)
Trait Implementations§
Source§impl Clone for TestScenario
impl Clone for TestScenario
Source§fn clone(&self) -> TestScenario
fn clone(&self) -> TestScenario
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TestScenario
impl RefUnwindSafe for TestScenario
impl Send for TestScenario
impl Sync for TestScenario
impl Unpin for TestScenario
impl UnsafeUnpin for TestScenario
impl UnwindSafe for TestScenario
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