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

Function test_lookup_existing

atomic-core/src/change/format_v3/hash_table.rs:876–884  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

874
875 #[test]
876 fn test_lookup_existing() {
877 let h0 = make_hash(0);
878 let h1 = make_hash(1);
879 let mut table = HashDedupTable::new(h0);
880 table.insert(h1).unwrap();
881
882 assert_eq!(table.lookup(&h0), Some(0));
883 assert_eq!(table.lookup(&h1), Some(1));
884 }
885
886 #[test]
887 fn test_lookup_missing() {

Callers

nothing calls this directly

Calls 3

make_hashFunction · 0.70
unwrapMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected