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

Function trie_st_drop_with_delete

tests/test_strings.rs:266–283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

264
265#[test]
266fn trie_st_drop_with_delete() {
267 use algo::common::drop::{self, Elem};
268
269 let mut st = TrieST::default();
270 drop::with(|ctx| {
271 st.put("aaa", Some(Elem));
272 st.put("bbb", Some(Elem));
273 st.put("ccc", Some(Elem));
274 st.put("ddd", Some(Elem));
275
276 st.delete("aaa");
277 st.delete("bbb");
278 assert_eq!(2, ctx.get());
279
280 drop(st);
281 assert_eq!(4, ctx.get());
282 });
283}
284
285#[test]
286fn trie_st_drop_with_put() {

Callers

nothing calls this directly

Calls 3

withFunction · 0.85
putMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected