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

Function test_remote_state_truncate_from_zero

atomic-remote/src/sync.rs:884–893  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

882
883 #[test]
884 fn test_remote_state_truncate_from_zero() {
885 let mut cache = RemoteState::empty();
886 cache.insert(0, Node::change("A", "S0"));
887 cache.insert(1, Node::change("B", "S1"));
888
889 cache.truncate_from(0);
890
891 assert!(cache.is_empty());
892 assert_eq!(cache.last_sequence(), None);
893 }
894
895 #[test]
896 fn test_remote_state_clear() {

Callers

nothing calls this directly

Calls 3

changeFunction · 0.85
truncate_fromMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected