pub struct CheckSettings { /* private fields */ }testing only.Expand description
Device, run length, thread counts, parameter overrides and exemptions of a check run.
Implementations§
Source§impl CheckSettings
impl CheckSettings
Sourcepub fn gpu(self, device: GpuContext) -> Self
pub fn gpu(self, device: GpuContext) -> Self
Runs the GPU models’ checks on device. Without a device, they are skipped.
Note that a check attributes every fault it finds in the device’s sink to itself, and clones of a context share
the sink. A test that shares device with another test can have its faults dropped, or reported by a check.
Each test takes its own device from headless_test_device.
Sourcepub fn ticks(self, ticks: u64) -> Self
pub fn ticks(self, ticks: u64) -> Self
Steps each run of a determinism check ticks ticks.
§Panics
Panics when ticks is below MIN_TICKS. A shorter run takes no sample at the coarser cadence of
ModelCheck::SamplingCadence past tick 0.
Sourcepub fn thread_counts(self, low: usize, high: usize) -> Self
pub fn thread_counts(self, low: usize, high: usize) -> Self
Compares runs at low and high worker threads in ModelCheck::ThreadCount, which sizes the work to split
into twice high jobs.
§Panics
Panics when low is 0 or not below high.
Sourcepub fn set_text(self, model_id: &str, param_id: &str, text: &str) -> Self
pub fn set_text(self, model_id: &str, param_id: &str, text: &str) -> Self
Sets parameter param_id of model model_id from text, as --set reads it.
The value holds in every check that builds the model, and no check changes it. A parameter that the model does not declare, or a value that the parameter rejects, fails every such check, including a check that cannot run for want of a device.
Sourcepub fn exempt(self, model_id: &str, check: ModelCheck, reason: &str) -> Self
pub fn exempt(self, model_id: &str, check: ModelCheck, reason: &str) -> Self
Skips check for model model_id, recording reason in its report.
Trait Implementations§
Source§impl Clone for CheckSettings
impl Clone for CheckSettings
Source§impl Debug for CheckSettings
impl Debug for CheckSettings
Auto Trait Implementations§
impl !RefUnwindSafe for CheckSettings
impl !UnwindSafe for CheckSettings
impl Freeze for CheckSettings
impl Send for CheckSettings
impl Sync for CheckSettings
impl Unpin for CheckSettings
impl UnsafeUnpin for CheckSettings
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