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

Function test_diff_modified_file_size

atomic-agent/src/watcher/fallback.rs:442–465  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

440
441 #[test]
442 fn test_diff_modified_file_size() {
443 let t = SystemTime::now();
444
445 let mut before = HashMap::new();
446 before.insert(
447 PathBuf::from("mod.rs"),
448 FileEntry {
449 mtime: t,
450 size: 100,
451 },
452 );
453
454 let mut after = HashMap::new();
455 after.insert(
456 PathBuf::from("mod.rs"),
457 FileEntry {
458 mtime: t,
459 size: 200,
460 },
461 );
462
463 let changes = diff_snapshots(&before, &after);
464 assert_eq!(changes.modified, vec![PathBuf::from("mod.rs")]);
465 }
466
467 #[test]
468 fn test_diff_mixed_changes() {

Callers

nothing calls this directly

Calls 2

diff_snapshotsFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected