Eliminate unused variable warnings in stdtest
This commit is contained in:
parent
45b614f54a
commit
c274d16b7f
@ -4,7 +4,7 @@ import std::comm;
|
||||
#[test]
|
||||
fn create_port_and_chan() {
|
||||
let p = comm::mk_port::<int>();
|
||||
let c = p.mk_chan();
|
||||
p.mk_chan();
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -39,5 +39,5 @@ fn chan_chan() {
|
||||
let p = comm::port(), p2 = comm::port::<int>();
|
||||
let c = comm::chan(p);
|
||||
comm::send(c, comm::chan(p2));
|
||||
let c2 = comm::recv(p);
|
||||
comm::recv(p);
|
||||
}
|
||||
|
@ -6,14 +6,14 @@ import std::vec::len;
|
||||
fn test_either_left() {
|
||||
let val = left(10);
|
||||
fn f_left(x: &int) -> bool { x == 10 }
|
||||
fn f_right(x: &uint) -> bool { false }
|
||||
fn f_right(_x: &uint) -> bool { false }
|
||||
assert (either(f_left, f_right, val));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_either_right() {
|
||||
let val = right(10u);
|
||||
fn f_left(x: &int) -> bool { false }
|
||||
fn f_left(_x: &int) -> bool { false }
|
||||
fn f_right(x: &uint) -> bool { x == 10u }
|
||||
assert (either(f_left, f_right, val));
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ fn test_find_success() {
|
||||
#[test]
|
||||
fn test_find_fail() {
|
||||
let l = from_vec([0, 1, 2]);
|
||||
fn match(i: &int) -> option::t<int> { ret option::none::<int>; }
|
||||
fn match(_i: &int) -> option::t<int> { ret option::none::<int>; }
|
||||
let rs = list::find(l, match);
|
||||
assert (rs == option::none::<int>);
|
||||
}
|
||||
|
@ -2,4 +2,4 @@
|
||||
use std;
|
||||
|
||||
#[test]
|
||||
fn test() { let x = std::option::some::<int>(10); }
|
||||
fn test() { let _x = std::option::some::<int>(10); }
|
||||
|
@ -359,6 +359,7 @@ fn reverse_and_reversed() {
|
||||
// Make sure they work with 0-length vectors too.
|
||||
|
||||
let v4 = vec::reversed::<int>([]);
|
||||
assert v4 == [];
|
||||
let v3: [mutable int] = [mutable];
|
||||
vec::reverse::<int>(v3);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user