aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRoy Frostig <[email protected]>2010-08-03 18:43:57 -0700
committerRoy Frostig <[email protected]>2010-08-03 18:43:57 -0700
commit6277b462e938d9df8b75126244817d2e28dab80a (patch)
tree3c749931de346aabaeaeafc86a2620da6f799fc5 /src/test
parentAddress _vec.map allocation FIXME. Add test. (diff)
downloadrust-6277b462e938d9df8b75126244817d2e28dab80a.tar.xz
rust-6277b462e938d9df8b75126244817d2e28dab80a.zip
More stdlib hashmap work. Add a simple test and XFAIL it due to a valgrind-spotted UMR.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/lib-map.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/run-pass/lib-map.rs b/src/test/run-pass/lib-map.rs
new file mode 100644
index 00000000..11101c84
--- /dev/null
+++ b/src/test/run-pass/lib-map.rs
@@ -0,0 +1,16 @@
+// -*- rust -*-
+
+use std;
+import std.map;
+
+fn test_simple() {
+ fn eq(&uint x, &uint y) -> bool { ret x == y; }
+
+ let map.hashfn[uint] hasher = std.util.id[uint];
+ let map.eqfn[uint] eqer = eq;
+ let map.hashmap[uint, uint] hm = map.mk_hashmap[uint, uint](hasher, eqer);
+}
+
+fn main() {
+ test_simple();
+} \ No newline at end of file