()
| 304 | |
| 305 | #[test] |
| 306 | fn 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] |
| 323 | fn tst_drop_with_put_none() { |