1//! Deterministic seeds for the page-model mutation driver shared with the `page_model` fuzz target.
2
3#[path = "support/page_edits.rs"]
4mod page_edits;
5
6#[test]
7fn random_model_edits_publish_and_read_back() {
8 for seed in [
9 vec![0, 0, 3, 0, 5, b'a', b'b'],
10 vec![1, 3, 2, 0, 0, 1, 2, 4, 1, 3, 5, 0, 2],
11 vec![2, 2, 1, 3, 4, 0, 0, 7, 1, 0, 8, 9, 10],
12 vec![3, 5, 4, 5, 0, 1, 7, 0, 30, 40, 6, 0, 0],
13 ] {
14 page_edits::run(&seed);
15 }
16 let mut state = 0x2545_f491_4f6c_dd1d_u64;
17 for _ in 0..400 {
18 let mut input = Vec::new();
19 state ^= state << 13;
20 state ^= state >> 7;
21 state ^= state << 17;
22 let length = 8 + (state % 40) as usize;
23 for _ in 0..length {
24 state ^= state << 13;
25 state ^= state >> 7;
26 state ^= state << 17;
27 input.push((state >> 24) as u8);
28 }
29 page_edits::run(&input);
30 }
31}