pub struct Register { /* private fields */ }Expand description
A fixture of recorded divergences, run by every port.
Each row gives an input and one cell per runtime, written in the same
vocabulary as an ordinary fixture’s expected column: a JSON value, or
ERROR:<code>. Every row is checked three ways:
- The row must actually record a divergence. If every runtime cell says the same thing, the row asserts nothing and would pass forever; that is the shape of the claims this mechanism replaces.
- This runtime must still produce what the register says it does.
- When it does not, and it now produces what ANOTHER runtime’s cell says, the failure says the divergence is CLOSED and names the row to delete, rather than reporting it as a regression, which is the opposite conclusion.
Implementations§
Source§impl Register
impl Register
Sourcepub fn new(runner: Runner, runtime: &str, runtimes: &[&str]) -> Self
pub fn new(runner: Runner, runtime: &str, runtimes: &[&str]) -> Self
A register reading the runtime column of a file whose runtime
columns are runtimes.
Sourcepub fn check_row(&self, row: &Row, input: &str) -> Result<()>
pub fn check_row(&self, row: &Row, input: &str) -> Result<()>
Run one row and return the failure rather than reporting it.
Sourcepub fn run_spec(&self, spec: &SpecFile) -> Result<Vec<String>>
pub fn run_spec(&self, spec: &SpecFile) -> Result<Vec<String>>
Run every row of an already-loaded register. Err when it cannot
run at all; otherwise the failures, one per failing row.
Sourcepub fn run_file(&self, path: impl AsRef<Path>) -> Result<Vec<String>>
pub fn run_file(&self, path: impl AsRef<Path>) -> Result<Vec<String>>
Load one register file by path and run it; see Register::run_spec.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Register
impl !Send for Register
impl !Sync for Register
impl !UnwindSafe for Register
impl Freeze for Register
impl Unpin for Register
impl UnsafeUnpin for Register
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