Make moves explicit in core tests

This commit is contained in:
Tim Chevalier
2012-09-18 22:35:28 -07:00
parent 2d7d12b902
commit 30a62793fa
22 changed files with 178 additions and 146 deletions

View File

@@ -739,7 +739,7 @@ unsafe fn load_argc_and_argv(argc: c_int, argv: **c_char) -> ~[~str] {
for uint::range(0, argc as uint) |i| {
vec::push(&mut args, str::raw::from_c_str(*argv.offset(i)));
}
return args;
move args
}
/**
@@ -903,7 +903,7 @@ mod tests {
let rng: rand::Rng = rand::Rng();
let n = ~"TEST" + rng.gen_str(10u);
assert getenv(n).is_none();
n
move n
}
#[test]
@@ -937,7 +937,7 @@ mod tests {
let n = make_rand_name();
setenv(n, s);
log(debug, s);
assert getenv(n) == option::Some(s);
assert getenv(n) == option::Some(move s);
}
#[test]
@@ -963,7 +963,7 @@ mod tests {
// MingW seems to set some funky environment variables like
// "=C:=C:\MinGW\msys\1.0\bin" and "!::=::\" that are returned
// from env() but not visible from getenv().
assert v2.is_none() || v2 == option::Some(v);
assert v2.is_none() || v2 == option::Some(move v);
}
}
@@ -976,7 +976,7 @@ mod tests {
assert !vec::contains(e, &(copy n, ~"VALUE"));
e = env();
assert vec::contains(e, &(n, ~"VALUE"));
assert vec::contains(e, &(move n, ~"VALUE"));
}
#[test]