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

Function test_diff_modified_file_mtime

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

Source from the content-addressed store, hash-verified

413
414 #[test]
415 fn test_diff_modified_file_mtime() {
416 let t1 = SystemTime::UNIX_EPOCH;
417 let t2 = SystemTime::now();
418
419 let mut before = HashMap::new();
420 before.insert(
421 PathBuf::from("mod.rs"),
422 FileEntry {
423 mtime: t1,
424 size: 100,
425 },
426 );
427
428 let mut after = HashMap::new();
429 after.insert(
430 PathBuf::from("mod.rs"),
431 FileEntry {
432 mtime: t2,
433 size: 100,
434 },
435 );
436
437 let changes = diff_snapshots(&before, &after);
438 assert_eq!(changes.modified, vec![PathBuf::from("mod.rs")]);
439 }
440
441 #[test]
442 fn test_diff_modified_file_size() {

Callers

nothing calls this directly

Calls 2

diff_snapshotsFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected