| 1211 | use atomic_core::types::{ChangePosition, EdgeFlags, Position, SetId}; |
| 1212 | |
| 1213 | fn project() -> (ProjectTree, VerifiedProspectiveEquivalence) { |
| 1214 | let policy = ConversionPolicy::new(GitHashAlgorithm::Sha1); |
| 1215 | let entries = [("a.txt", b"one\n".to_vec()), ("b.txt", b"two\n".to_vec())] |
| 1216 | .into_iter() |
| 1217 | .map(|(path, bytes)| { |
| 1218 | RepositoryEntry::new( |
| 1219 | RepoPath::from_bytes(path.as_bytes()).unwrap(), |
| 1220 | bytes, |
| 1221 | 0o644, |
| 1222 | atomic_core::change::InodeKind::Regular, |
| 1223 | None, |
| 1224 | ManifestDisposition::Included, |
| 1225 | ) |
| 1226 | .unwrap() |
| 1227 | }) |
| 1228 | .collect(); |
| 1229 | let manifest = |
| 1230 | RepositoryManifest::new(SetId::ZERO, policy.root().content_key, entries).unwrap(); |
| 1231 | let project = ProjectTree::from_manifest(manifest, &policy).unwrap(); |
| 1232 | let proof = crate::verify_prospective_equivalence(&project, &project.git.root).unwrap(); |
| 1233 | (project, proof) |
| 1234 | } |
| 1235 | fn entry( |
| 1236 | seed: u8, |
| 1237 | parent: Option<u8>, |