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

Function test_many_entries

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

Source from the content-addressed store, hash-verified

1273
1274 #[test]
1275 fn test_many_entries() {
1276 // Test with a realistic number of dependencies
1277 let mut table = HashDedupTable::new(make_hash(0));
1278 for i in 1..=255u8 {
1279 table.insert(make_hash(i)).unwrap();
1280 }
1281
1282 assert_eq!(table.len(), 256);
1283 assert_eq!(table.dependency_hashes().len(), 255);
1284
1285 // Verify all entries
1286 for i in 0..=255u8 {
1287 let h = make_hash(i);
1288 assert_eq!(table.lookup(&h), Some(i as HashIndex));
1289 assert_eq!(table.resolve(i as HashIndex), Some(&h));
1290 }
1291 }
1292
1293 #[test]
1294 fn test_blake3_hashes() {

Callers

nothing calls this directly

Calls 3

make_hashFunction · 0.70
unwrapMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected