MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / len_counts_all

Function len_counts_all

nodedb-array/src/sync/op_log.rs:221–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219
220 #[test]
221 fn len_counts_all() {
222 let log = InMemoryOpLog::new();
223 assert_eq!(log.len().unwrap(), 0);
224 log.append(&make_op("x", 1, 0)).unwrap();
225 log.append(&make_op("y", 2, 0)).unwrap();
226 assert_eq!(log.len().unwrap(), 2);
227 // Idempotent re-append.
228 log.append(&make_op("x", 1, 0)).unwrap();
229 assert_eq!(log.len().unwrap(), 2);
230 }
231}

Callers

nothing calls this directly

Calls 2

make_opFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected