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

Function test_outcome_add_error

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

Source from the content-addressed store, hash-verified

401
402#[test]
403fn test_outcome_add_error() {
404 let header = ChangeHeader::builder().message("Test").build();
405 let change = Change::empty(header);
406 let hash = Hash::of(b"test");
407 let stats = RecordStats::new();
408
409 let mut outcome = RecordOutcome::new(change, hash, stats);
410 outcome.add_error("file.rs".to_string(), "read error".to_string());
411
412 assert!(outcome.has_errors());
413 assert_eq!(outcome.errors().len(), 1);
414}
415
416#[test]
417fn test_outcome_display() {

Callers

nothing calls this directly

Calls 3

buildMethod · 0.45
messageMethod · 0.45
add_errorMethod · 0.45

Tested by

no test coverage detected