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:845–854  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

843
844 #[test]
845 fn test_remote_state_truncate_from_zero() {
846 let mut cache = RemoteState::empty();
847 cache.insert(0, Node::change("A", "S0"));
848 cache.insert(1, Node::change("B", "S1"));
849
850 cache.truncate_from(0);
851
852 assert!(cache.is_empty());
853 assert_eq!(cache.last_sequence(), None);
854 }
855
856 #[test]
857 fn test_remote_state_clear() {

Callers

nothing calls this directly

Calls 2

truncate_fromMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected