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

Function test_outcome_set_applied

atomic-repository/src/record/tests.rs:366–377  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

364
365#[test]
366fn test_outcome_set_applied() {
367 let header = ChangeHeader::builder().message("Test").build();
368 let change = Change::empty(header);
369 let hash = Hash::of(b"test");
370 let stats = RecordStats::new();
371
372 let mut outcome = RecordOutcome::new(change, hash, stats);
373 let state = Merkle::of(b"state");
374 outcome.set_applied(state);
375 assert!(outcome.was_applied());
376 assert_eq!(outcome.new_state(), Some(state));
377}
378
379#[test]
380fn test_outcome_add_files() {

Callers

nothing calls this directly

Calls 3

set_appliedMethod · 0.80
buildMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected