]> git.lizzy.rs Git - rust.git/blob - library/alloc/tests/linked_list.rs
Rollup merge of #101936 - IntQuant:issue-100717-infer-4, r=compiler-errors
[rust.git] / library / alloc / tests / linked_list.rs
1 use std::collections::LinkedList;
2
3 #[test]
4 fn test_hash() {
5     use crate::hash;
6
7     let mut x = LinkedList::new();
8     let mut y = LinkedList::new();
9
10     assert!(hash(&x) == hash(&y));
11
12     x.push_back(1);
13     x.push_back(2);
14     x.push_back(3);
15
16     y.push_front(3);
17     y.push_front(2);
18     y.push_front(1);
19
20     assert!(hash(&x) == hash(&y));
21 }