From a24f46984d51d8533c5ce85d18566394883fcf4b Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 11 Jun 2020 16:27:56 -0400 Subject: ... --- tests/common/mod.rs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'tests/common') diff --git a/tests/common/mod.rs b/tests/common/mod.rs index ce49ec5..def85fb 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -600,7 +600,8 @@ impl PaintingSim { fgen.get_count() } - pub fn check(&self, + pub fn check( + &self, state: &mut WALStoreEmulState, canvas: &mut Canvas, wal: WALLoader, @@ -634,19 +635,25 @@ impl PaintingSim { } } else { let canvas0 = canvas.new_reference(&[]); - if canvas.is_same(&canvas0) { None } - else { - let i0 = ops.len() - self.m - 1; + if canvas.is_same(&canvas0) { + None + } else { + let i0 = ops.len() - self.m; let mut canvas0 = canvas0.new_reference(&ops[..i0]); let mut res = None; 'outer: loop { + if canvas.is_same(&canvas0) { + break; + } for i in i0..ops.len() { canvas0.prepaint(&ops[i], &WALRingId::empty_id()); canvas0.paint_all(); - if canvas.is_same(&canvas0) { break 'outer } + if canvas.is_same(&canvas0) { + break 'outer; + } } res = Some(canvas0); - break + break; } res } -- cgit v1.2.3-70-g09d2