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

Function trie_st_drop_with_put

tests/test_strings.rs:286–303  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284
285#[test]
286fn trie_st_drop_with_put() {
287 use algo::common::drop::{self, Elem};
288
289 let mut st = TrieST::default();
290 drop::with(|ctx| {
291 st.put("aaa", Some(Elem));
292 st.put("bbb", Some(Elem));
293 st.put("ccc", Some(Elem));
294 st.put("ddd", Some(Elem));
295
296 st.put("aaa", None);
297 st.put("bbb", None);
298 assert_eq!(2, ctx.get());
299
300 drop(st);
301 assert_eq!(4, ctx.get());
302 });
303}
304
305#[test]
306fn tst_drop() {

Callers

nothing calls this directly

Calls 2

withFunction · 0.85
putMethod · 0.45

Tested by

no test coverage detected