blob: 65b09cb00c45ddeb06a951f9c7e2037178ed35d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
use std::collections::LinkedList;
#[test]
fn test_hash() {
use crate::hash;
let mut x = LinkedList::new();
let mut y = LinkedList::new();
assert!(hash(&x) == hash(&y));
x.push_back(1);
x.push_back(2);
x.push_back(3);
y.push_front(3);
y.push_front(2);
y.push_front(1);
assert!(hash(&x) == hash(&y));
}
|