MCPcopy Create free account
hub / github.com/douchuan/algorithm / drop_clear

Function drop_clear

tests/test_bst_tree.rs:125–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123
124#[test]
125fn drop_clear() {
126 use algo::common::drop::{self, Elem};
127 drop::with(|ctx| {
128 let mut tree = Tree::default();
129 for v in 0..100 {
130 tree.insert(v, Elem);
131 }
132 drop(tree);
133 assert_eq!(100, ctx.get());
134 });
135}
136
137#[test]
138fn drop_with_delete() {

Callers

nothing calls this directly

Calls 2

withFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected