| 159 | |
| 160 | #[test] |
| 161 | fn test_stats_merge() { |
| 162 | let mut stats1 = RecordingStats::new(); |
| 163 | stats1.files_recorded = 2; |
| 164 | stats1.hunks_created = 3; |
| 165 | stats1.lines_added = 10; |
| 166 | |
| 167 | let mut stats2 = RecordingStats::new(); |
| 168 | stats2.files_recorded = 1; |
| 169 | stats2.hunks_created = 2; |
| 170 | stats2.lines_deleted = 5; |
| 171 | |
| 172 | stats1.merge(&stats2); |
| 173 | |
| 174 | assert_eq!(stats1.files_recorded, 3); |
| 175 | assert_eq!(stats1.hunks_created, 5); |
| 176 | assert_eq!(stats1.lines_added, 10); |
| 177 | assert_eq!(stats1.lines_deleted, 5); |
| 178 | } |
| 179 | |
| 180 | #[test] |
| 181 | fn test_stats_clone() { |