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

Function test_remote_state_insert_multiple

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

Source from the content-addressed store, hash-verified

841
842 #[test]
843 fn test_remote_state_insert_multiple() {
844 let mut cache = RemoteState::empty();
845 cache.insert(0, Node::change("A", "S0"));
846 cache.insert(1, Node::change("B", "S1"));
847 cache.insert(2, Node::change("C", "S2"));
848
849 assert_eq!(cache.len(), 3);
850 assert_eq!(cache.last_sequence(), Some(2));
851 assert_eq!(cache.get_state(1), Some("S1"));
852 }
853
854 #[test]
855 fn test_remote_state_insert_out_of_order() {

Callers

nothing calls this directly

Calls 2

changeFunction · 0.50
insertMethod · 0.45

Tested by

no test coverage detected