()
| 44 | } |
| 45 | |
| 46 | fn fixture() -> Model { |
| 47 | let mut model = Model::default(); |
| 48 | for patch in ["P", "X", "Q", "Y"] { |
| 49 | model |
| 50 | .required |
| 51 | .insert(name(patch), (h("inode"), BTreeSet::from([2, 3]))); |
| 52 | model |
| 53 | .provided |
| 54 | .insert(h(patch), (h("inode"), BTreeSet::from([2, 3, 4]))); |
| 55 | model.attachments.insert( |
| 56 | h(patch), |
| 57 | format!("unchanged synthetic attachment for {patch}").into_bytes(), |
| 58 | ); |
| 59 | } |
| 60 | model.provided.insert( |
| 61 | h("wrong-inode"), |
| 62 | (h("other inode"), BTreeSet::from([2, 3, 4])), |
| 63 | ); |
| 64 | model |
| 65 | .provided |
| 66 | .insert(h("missing-item"), (h("inode"), BTreeSet::from([2]))); |
| 67 | model |
| 68 | } |
| 69 | |
| 70 | impl Model { |
| 71 | fn apply(&mut self, id: Hash, effect: Effect) -> Result<(), &'static str> { |
no test coverage detected