()
| 386 | |
| 387 | #[test] |
| 388 | fn test_outcome_add_error() { |
| 389 | let header = ChangeHeader::builder().message("Test").build(); |
| 390 | let change = Change::empty(header); |
| 391 | let hash = Hash::of(b"test"); |
| 392 | let stats = RecordStats::new(); |
| 393 | |
| 394 | let mut outcome = RecordOutcome::new(change, hash, stats); |
| 395 | outcome.add_error("file.rs".to_string(), "read error".to_string()); |
| 396 | |
| 397 | assert!(outcome.has_errors()); |
| 398 | assert_eq!(outcome.errors().len(), 1); |
| 399 | } |
| 400 | |
| 401 | #[test] |
| 402 | fn test_outcome_display() { |