Skip to content

Commit 5122bee

Browse files
committed
---
yaml --- r: 63223 b: refs/heads/snap-stage3 c: 9fff8c6 h: refs/heads/master i: 63221: 4519704 63219: cd1fdd6 63215: 9eb6b9d v: v3
1 parent 77ffd3a commit 5122bee

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: efc71a8bdb28fba88d0cc8916b33838bf43b3a8d
4+
refs/heads/snap-stage3: 9fff8c6eba287e0ed7cce6014dc58482afe425b0
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/hashmap.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,23 @@ mod test_map {
866866
assert_eq!(m.len(), i);
867867
assert!(!m.is_empty());
868868
}
869+
870+
#[test]
871+
fn test_find_equiv() {
872+
let mut m = HashMap::new();
873+
874+
let (foo, bar, baz) = (1,2,3);
875+
m.insert(~"foo", foo);
876+
m.insert(~"bar", bar);
877+
m.insert(~"baz", baz);
878+
879+
880+
assert_eq!(m.find_equiv(&("foo")), Some(&foo));
881+
assert_eq!(m.find_equiv(&("bar")), Some(&bar));
882+
assert_eq!(m.find_equiv(&("baz")), Some(&baz));
883+
884+
assert_eq!(m.find_equiv(&("qux")), None);
885+
}
869886
}
870887

871888
#[cfg(test)]

0 commit comments

Comments
 (0)