aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Frostig <[email protected]>2010-08-26 20:02:07 -0700
committerRoy Frostig <[email protected]>2010-08-26 20:02:07 -0700
commit1035ad93dd7c77c48359c0d1bfc5299e7aaacb1e (patch)
tree09859bfdc79fa0670368f8029e2b600214b716bb
parentTest the hashmap more, exercising hash collision, element removal, and a forc... (diff)
downloadrust-1035ad93dd7c77c48359c0d1bfc5299e7aaacb1e.tar.xz
rust-1035ad93dd7c77c48359c0d1bfc5299e7aaacb1e.zip
Pinching myself for certainty. ;p
-rw-r--r--src/test/run-pass/lib-map.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/run-pass/lib-map.rs b/src/test/run-pass/lib-map.rs
index a59bdf00..d11ae6b8 100644
--- a/src/test/run-pass/lib-map.rs
+++ b/src/test/run-pass/lib-map.rs
@@ -102,6 +102,10 @@ fn test_removal() {
ret (u / 2u) * 2u;
}
+ check (hash(0u) == hash(1u));
+ check (hash(2u) == hash(3u));
+ check (hash(0u) != hash(2u));
+
let map.hashfn[uint] hasher = hash;
let map.eqfn[uint] eqer = eq;
let map.hashmap[uint, uint] hm = map.mk_hashmap[uint, uint](hasher, eqer);