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

Function test_outcome_set_applied

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

Source from the content-addressed store, hash-verified

357
358#[test]
359fn test_outcome_set_applied() {
360 let header = ChangeHeader::builder().message("Test").build();
361 let change = Change::empty(header);
362 let hash = Hash::of(b"test");
363 let stats = RecordStats::new();
364
365 let mut outcome = RecordOutcome::new(change, hash, stats);
366 let state = Merkle::of(b"state");
367 outcome.set_applied(state);
368 assert!(outcome.was_applied());
369 assert_eq!(outcome.new_state(), Some(state));
370}
371
372#[test]
373fn 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