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

Function basic_put_get

nodedb/src/engine/sparse/doc_cache.rs:384–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

382
383 #[test]
384 fn basic_put_get() {
385 let mut cache = DocCache::new(16);
386 cache.put(0, 1, "users", "u1", b"alice");
387 assert_eq!(cache.get(0, 1, "users", "u1"), Some(b"alice".as_slice()));
388 assert_eq!(cache.get(0, 1, "users", "u2"), None);
389 }
390
391 #[test]
392 fn overwrite_updates_value() {

Callers

nothing calls this directly

Calls 1

putMethod · 0.45

Tested by

no test coverage detected