diff options
| author | Roy Frostig <[email protected]> | 2010-08-03 18:43:57 -0700 |
|---|---|---|
| committer | Roy Frostig <[email protected]> | 2010-08-03 18:43:57 -0700 |
| commit | 6277b462e938d9df8b75126244817d2e28dab80a (patch) | |
| tree | 3c749931de346aabaeaeafc86a2620da6f799fc5 /src/test | |
| parent | Address _vec.map allocation FIXME. Add test. (diff) | |
| download | rust-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.rs | 16 |
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 |