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

Function test_stats_crdt_display

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

Source from the content-addressed store, hash-verified

290
291#[test]
292fn test_stats_crdt_display() {
293 let mut stats = RecordStats::new();
294 stats.files_recorded = 2;
295 stats.hunks_created = 3;
296 stats.vertices_added = 10;
297 stats.edges_modified = 5;
298 stats.content_bytes = 512;
299 stats.lines_added = 15;
300 stats.lines_deleted = 3;
301 stats.lines_modified = 2;
302 stats.tokens_added = 45;
303 stats.tokens_deleted = 8;
304 stats.tokens_replaced = 4;
305
306 let display = format!("{}", stats);
307 // Basic stats
308 assert!(display.contains("2 file(s)"));
309 assert!(display.contains("3 graph_op(s)"));
310 // CRDT stats
311 assert!(display.contains("+15 -3 ~2 lines"));
312 assert!(display.contains("+45 -8 ~4 tokens"));
313}
314
315#[test]
316fn test_stats_total_line_changes() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected