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

Function test_inode_vertex_hash

atomic-core/src/pristine/inode_graph/tests.rs:123–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121
122#[test]
123fn test_inode_vertex_hash() {
124 use std::collections::HashSet;
125 let iv1 = InodeVertex::new(Inode::new(1), GraphNode::ROOT);
126 let iv2 = InodeVertex::new(Inode::new(2), GraphNode::ROOT);
127 let iv3 = InodeVertex::new(Inode::new(1), GraphNode::ROOT); // duplicate
128
129 let mut set = HashSet::new();
130 set.insert(iv1);
131 set.insert(iv2);
132 set.insert(iv3);
133 assert_eq!(set.len(), 2);
134}
135
136// -------------------------------------------------------------------------
137// InodeAdjState Tests

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected