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

Function test_outcome_set_applied

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

Source from the content-addressed store, hash-verified

372
373#[test]
374fn test_outcome_set_applied() {
375 let header = ChangeHeader::builder().message("Test").build();
376 let change = Change::empty(header);
377 let hash = Hash::of(b"test");
378 let stats = RecordStats::new();
379
380 let mut outcome = RecordOutcome::new(change, hash, stats);
381 let state = Merkle::of(b"state");
382 outcome.set_applied(state);
383 assert!(outcome.was_applied());
384 assert_eq!(outcome.new_state(), Some(state));
385}
386
387#[test]
388fn 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