aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2020-06-11 17:15:44 -0400
committerDeterminant <[email protected]>2020-06-11 17:15:44 -0400
commitd3137d4c37d66ace3ea4583afa3edfed48f42988 (patch)
treef6fb52f9812d7c9020e7375a3fa73c4eb1a2b98c /tests
parentb02d58c4f3a2b7ad6e32fe3e7a493cec655631ba (diff)
...
Diffstat (limited to 'tests')
-rw-r--r--tests/rand_fail.rs59
1 files changed, 33 insertions, 26 deletions
diff --git a/tests/rand_fail.rs b/tests/rand_fail.rs
index 055f933..8f74c29 100644
--- a/tests/rand_fail.rs
+++ b/tests/rand_fail.rs
@@ -3,7 +3,11 @@
use std::collections::HashMap;
use std::rc::Rc;
-fn _multi_point_failure(sims: &[common::PaintingSim], state: &common::WALStoreEmulState, f: usize) {
+fn _multi_point_failure(
+ sims: &[common::PaintingSim],
+ state: &common::WALStoreEmulState,
+ f: usize,
+) {
let sim = &sims[0];
// save the current state and start from there
let mut state = state.clone();
@@ -66,30 +70,33 @@ fn single_point_failure1() {
#[test]
fn two_failures() {
- let sims = [common::PaintingSim {
- block_nbit: 5,
- file_nbit: 6,
- file_cache: 1000,
- n: 10,
- m: 5,
- k: 100,
- csize: 1000,
- stroke_max_len: 10,
- stroke_max_col: 256,
- stroke_max_n: 3,
- seed: 0,
- }, common::PaintingSim {
- block_nbit: 5,
- file_nbit: 6,
- file_cache: 1000,
- n: 10,
- m: 5,
- k: 100,
- csize: 1000,
- stroke_max_len: 10,
- stroke_max_col: 256,
- stroke_max_n: 3,
- seed: 0,
- }];
+ let sims = [
+ common::PaintingSim {
+ block_nbit: 5,
+ file_nbit: 6,
+ file_cache: 1000,
+ n: 10,
+ m: 5,
+ k: 100,
+ csize: 1000,
+ stroke_max_len: 10,
+ stroke_max_col: 256,
+ stroke_max_n: 3,
+ seed: 0,
+ },
+ common::PaintingSim {
+ block_nbit: 5,
+ file_nbit: 6,
+ file_cache: 1000,
+ n: 10,
+ m: 5,
+ k: 100,
+ csize: 1000,
+ stroke_max_len: 10,
+ stroke_max_col: 256,
+ stroke_max_n: 3,
+ seed: 0,
+ },
+ ];
multi_point_failure(&sims);
}