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

Function drop_clear

tests/test_linked_list.rs:63–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61
62#[test]
63fn drop_clear() {
64 use algo::common::drop::{self, Elem};
65 drop::with(|ctx| {
66 let mut ll = LinkedList::default();
67 ll.push_back(Elem);
68 ll.push_front(Elem);
69 ll.push_back(Elem);
70 ll.push_front(Elem);
71 drop(ll);
72 assert_eq!(4, ctx.get());
73 });
74}
75
76#[test]
77fn drop_clear_with_reverse() {

Callers

nothing calls this directly

Calls 3

withFunction · 0.85
push_backMethod · 0.80
push_frontMethod · 0.80

Tested by

no test coverage detected