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

Function tst_drop_with_put_none

tests/test_strings.rs:323–341  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

321
322#[test]
323fn tst_drop_with_put_none() {
324 use algo::common::drop::{self, Elem};
325
326 // init
327 let mut st = TST::default();
328 drop::with(|ctx| {
329 st.put("aaa", Some(Elem));
330 st.put("bbb", Some(Elem));
331 st.put("ccc", Some(Elem));
332
333 // do drops
334 st.put("aaa", None);
335 assert_eq!(1, ctx.get());
336 st.put("bbb", None);
337 assert_eq!(2, ctx.get());
338 st.put("ccc", None);
339 assert_eq!(3, ctx.get());
340 });
341}
342
343#[test]
344fn brute_force_search() {

Callers

nothing calls this directly

Calls 2

withFunction · 0.85
putMethod · 0.45

Tested by

no test coverage detected