mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
20 lines
289 B
Rust
20 lines
289 B
Rust
use std::collections::BTreeSet;
|
|
|
|
#[test]
|
|
fn test_hash() {
|
|
use crate::hash;
|
|
|
|
let mut x = BTreeSet::new();
|
|
let mut y = BTreeSet::new();
|
|
|
|
x.insert(1);
|
|
x.insert(2);
|
|
x.insert(3);
|
|
|
|
y.insert(3);
|
|
y.insert(2);
|
|
y.insert(1);
|
|
|
|
assert_eq!(hash(&x), hash(&y));
|
|
}
|