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

Function insert_and_search_single

nodedb-spatial/src/rtree/tree.rs:178–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176
177 #[test]
178 fn insert_and_search_single() {
179 let mut tree = RTree::new();
180 tree.insert(make_entry(1, 10.0, 20.0));
181 assert_eq!(tree.len(), 1);
182 assert_eq!(
183 tree.search(&BoundingBox::new(5.0, 15.0, 15.0, 25.0)).len(),
184 1
185 );
186 assert!(
187 tree.search(&BoundingBox::new(50.0, 50.0, 60.0, 60.0))
188 .is_empty()
189 );
190 }
191
192 #[test]
193 fn insert_many_and_search() {

Callers

nothing calls this directly

Calls 2

make_entryFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected