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

Function test_clear

atomic-core/src/change/store.rs:644–658  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

642
643 #[test]
644 fn test_clear() {
645 let store = MemoryChangeStore::new();
646
647 for i in 0..5 {
648 let change = create_test_change(&format!("Change {}", i), &[i as u8]);
649 store.insert_change(change).unwrap();
650 }
651
652 assert_eq!(store.len(), 5);
653
654 store.clear();
655
656 assert!(store.is_empty());
657 assert_eq!(store.len(), 0);
658 }
659
660 #[test]
661 fn test_hashes() {

Callers

nothing calls this directly

Calls 4

create_test_changeFunction · 0.70
clearMethod · 0.65
unwrapMethod · 0.45
insert_changeMethod · 0.45

Tested by

no test coverage detected