pub struct Harness<S, T> { /* private fields */ }
👎Deprecated since 0.5.12: Replaced with
tryfn
crateAvailable on crate feature
harness
only.Expand description
[Fallback dependenciesforfallback-dependenciess [
Build script directivesck-build-script-directivess
[When to use packages or workspaces?ck-when-to-use-packages-or-workspacess [
Cargo and rustupes?cargo-and-rustups
See harness
for more details
Implementations§
source§impl<S, T, I, E> Harness<S, T>
impl<S, T, I, E> Harness<S, T>
sourcepub fn new(input_root: impl Into<PathBuf>, setup: S, test: T) -> Self
pub fn new(input_root: impl Into<PathBuf>, setup: S, test: T) -> Self
Specify where the test scenarios
input_root
: where to find the files. SeeSelf::select
for restricting what files are consideredsetup
: Given a path, choose the test name and the output locationtest
: Given a path, return the actual output value
sourcepub fn select<'p>(self, patterns: impl IntoIterator<Item = &'p str>) -> Self
pub fn select<'p>(self, patterns: impl IntoIterator<Item = &'p str>) -> Self
Path patterns for selecting input files
This used gitignore syntax
sourcepub fn action_env(self, var_name: &str) -> Self
👎Deprecated since 0.1.0: Replaced with Harness::with_assert
pub fn action_env(self, var_name: &str) -> Self
Harness::with_assert
Read the failure action from an environment variable
sourcepub fn action(self, action: Action) -> Self
👎Deprecated since 0.1.0: Replaced with Harness::with_assert
pub fn action(self, action: Action) -> Self
Harness::with_assert
Override the failure action
sourcepub fn with_assert(self, config: Assert) -> Self
pub fn with_assert(self, config: Assert) -> Self
Customize the assertion behavior
Auto Trait Implementations§
impl<S, T> Freeze for Harness<S, T>
impl<S, T> RefUnwindSafe for Harness<S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for Harness<S, T>
impl<S, T> Sync for Harness<S, T>
impl<S, T> Unpin for Harness<S, T>
impl<S, T> UnwindSafe for Harness<S, T>where
S: UnwindSafe,
T: UnwindSafe,
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