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

Function round_trip_draft_with_parent

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

Source from the content-addressed store, hash-verified

273 /// prefix included) through the round-trip.
274 #[test]
275 fn round_trip_draft_with_parent() {
276 // Log = inherited prefix (1, 2) + own suffix (3, 4, 5): the manifest
277 // carries the stored log, never a delta.
278 let m = ViewManifest::new(
279 "orange-night-44fb",
280 ViewScope::Draft,
281 Some("dev".to_string()),
282 vec![h(1), h(2), h(3), h(4), h(5)],
283 );
284 m.verify().unwrap();
285
286 let parsed = ViewManifest::parse(&m.to_text()).unwrap();
287 assert_eq!(parsed, m);
288 assert!(parsed.scope.is_draft());
289 assert_eq!(parsed.parent.as_deref(), Some("dev"));
290 assert_eq!(parsed.changes.len(), 5);
291 }
292
293 /// An empty view serializes its state as `-` and folds to ZERO.
294 #[test]

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