Add test
This commit is contained in:
committed by
Julien Cretin
parent
67fa8bee0b
commit
daa16d948f
@@ -453,6 +453,12 @@ impl StoreDriverOn {
|
||||
self.apply(StoreOperation::Transaction { updates })
|
||||
}
|
||||
|
||||
/// Applies a clear operation to the store and model without interruption.
|
||||
#[cfg(feature = "std")]
|
||||
pub fn clear(&mut self, min_key: usize) -> Result<(), StoreInvariant> {
|
||||
self.apply(StoreOperation::Clear { min_key })
|
||||
}
|
||||
|
||||
/// Checks that the store and model are in sync.
|
||||
pub fn check(&self) -> Result<(), StoreInvariant> {
|
||||
self.recover_check(&[])
|
||||
@@ -610,4 +616,12 @@ impl<'a> StoreInterruption<'a> {
|
||||
corrupt: Box::new(|_, _| {}),
|
||||
}
|
||||
}
|
||||
|
||||
/// Builds an interruption without corruption.
|
||||
pub fn pure(delay: usize) -> StoreInterruption<'a> {
|
||||
StoreInterruption {
|
||||
delay,
|
||||
corrupt: Box::new(|_, _| {}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user