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

Function tst_drop

tests/test_strings.rs:306–320  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

304
305#[test]
306fn tst_drop() {
307 use algo::common::drop::{self, Elem};
308
309 let mut st = TST::default();
310 drop::with(|ctx| {
311 st.put("aaa", Some(Elem));
312 st.put("bbb", Some(Elem));
313 st.put("ccc", Some(Elem));
314 st.put("ddd", Some(Elem));
315 // do drop
316 drop(st);
317
318 assert_eq!(4, ctx.get());
319 });
320}
321
322#[test]
323fn tst_drop_with_put_none() {

Callers

nothing calls this directly

Calls 2

withFunction · 0.85
putMethod · 0.45

Tested by

no test coverage detected