MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / round_trip_shared_root

Function round_trip_shared_root

atomic-repository/src/manifest.rs:261–270  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

259 /// A shared root view round-trips through text with an identical fold.
260 #[test]
261 fn round_trip_shared_root() {
262 let m = ViewManifest::new("dev", ViewScope::Shared, None, vec![h(1), h(2)]);
263 m.verify().unwrap();
264
265 let parsed = ViewManifest::parse(&m.to_text()).unwrap();
266 assert_eq!(parsed, m);
267 parsed.verify().unwrap();
268 assert_eq!(parsed.parent, None);
269 assert!(parsed.scope.is_shared());
270 }
271
272 /// A draft with a parent keeps scope, parent, and full log (inherited
273 /// prefix included) through the round-trip.

Callers

nothing calls this directly

Calls 4

parseFunction · 0.85
to_textMethod · 0.80
unwrapMethod · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected