diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-08-23 18:09:30 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-08-23 18:55:37 -0700 |
| commit | 18576e55f72b9bdcb0998870377e09b02b033f8b (patch) | |
| tree | 1a7d6f1d2c8c56340380a32c01c75747bfda47d1 /src/test | |
| parent | c1f239424534af38fd1dfab861fab6813c1c9c97 (diff) | |
| download | rust-18576e55f72b9bdcb0998870377e09b02b033f8b.tar.gz rust-18576e55f72b9bdcb0998870377e09b02b033f8b.zip | |
Resolve a number of FIXMEs
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/item-attributes.rs | 3 | ||||
| -rw-r--r-- | src/test/run-pass/tag.rs | 4 | ||||
| -rw-r--r-- | src/test/stdtest/bitv.rs | 2 | ||||
| -rw-r--r-- | src/test/stdtest/map.rs | 33 |
4 files changed, 8 insertions, 34 deletions
diff --git a/src/test/run-pass/item-attributes.rs b/src/test/run-pass/item-attributes.rs index 352fa4ac53e..93e54d56bc9 100644 --- a/src/test/run-pass/item-attributes.rs +++ b/src/test/run-pass/item-attributes.rs @@ -201,8 +201,7 @@ mod test_literals { #[mach_int = 100u32]; #[float = 1.0]; #[mach_float = 1.0f32]; - // FIXME (#622): Can't parse a nil literal here - //#[nil = ()]; + #[nil = ()]; #[bool = true]; mod m { } } diff --git a/src/test/run-pass/tag.rs b/src/test/run-pass/tag.rs index 534ab1dc395..12ac2614efe 100644 --- a/src/test/run-pass/tag.rs +++ b/src/test/run-pass/tag.rs @@ -7,9 +7,7 @@ tag colour { red(int, int); green; } fn f() { let x = red(1, 2); let y = green; - // FIXME: needs structural equality test working. - // assert (x != y); - + assert (x != y); } fn main() { f(); } diff --git a/src/test/stdtest/bitv.rs b/src/test/stdtest/bitv.rs index 249a43be13b..348ee3955dc 100644 --- a/src/test/stdtest/bitv.rs +++ b/src/test/stdtest/bitv.rs @@ -9,8 +9,6 @@ fn test_0_elements() { let exp; act = bitv::create(0u, false); exp = vec::init_elt::<uint>(0u, 0u); - // FIXME: why can't I write vec::<uint>()? - assert (bitv::eq_vec(act, exp)); } diff --git a/src/test/stdtest/map.rs b/src/test/stdtest/map.rs index 2da579cf472..aef78448d56 100644 --- a/src/test/stdtest/map.rs +++ b/src/test/stdtest/map.rs @@ -6,18 +6,13 @@ import std::map; import std::str; import std::uint; import std::util; +import std::option; #[test] fn test_simple() { log "*** starting test_simple"; fn eq_uint(x: &uint, y: &uint) -> bool { ret x == y; } - fn hash_uint(u: &uint) -> uint { - // FIXME: can't use std::util::id since we'd be capturing a type - // param, and presently we can't close items over type params. - - ret u; - } - let hasher_uint: map::hashfn<uint> = hash_uint; + let hasher_uint: map::hashfn<uint> = util::id; let eqer_uint: map::eqfn<uint> = eq_uint; let hasher_str: map::hashfn<str> = str::hash; let eqer_str: map::eqfn<str> = str::eq; @@ -89,14 +84,8 @@ fn test_growth() { log "*** starting test_growth"; let num_to_insert: uint = 64u; fn eq_uint(x: &uint, y: &uint) -> bool { ret x == y; } - fn hash_uint(u: &uint) -> uint { - // FIXME: can't use std::util::id since we'd be capturing a type - // param, and presently we can't close items over type params. - - ret u; - } log "uint -> uint"; - let hasher_uint: map::hashfn<uint> = hash_uint; + let hasher_uint: map::hashfn<uint> = util::id; let eqer_uint: map::eqfn<uint> = eq_uint; let hm_uu: map::hashmap<uint, uint> = map::mk_hashmap::<uint, uint>(hasher_uint, eqer_uint); @@ -194,23 +183,13 @@ fn test_removal() { log "removing evens"; i = 0u; while i < num_to_insert { - /** - * FIXME (issue #150): we want to check the removed value as in the - * following: - - let v: util.option<uint> = hm.remove(i); + let v = hm.remove(i); alt (v) { - case (util.some::<uint>(u)) { + option::some(u) { assert (u == (i * i)); } - case (util.none::<uint>()) { fail; } + option::none. { fail; } } - - * but we util.option is a tag type so util.some and util.none are - * off limits until we parse the dwarf for tag types. - */ - - hm.remove(i); i += 2u; } assert (hm.size() == num_to_insert / 2u); |
