Fix broken tests

This commit is contained in:
Brian Anderson 2012-12-14 15:57:59 -08:00
parent 47faeb9228
commit a9601bce10
5 changed files with 12 additions and 12 deletions

View File

@ -188,7 +188,7 @@ fn bfs2(graph: graph, key: node_id) -> bfs_result {
white => {
let i = i as node_id;
let neighbors = graph[i];
let neighbors = copy graph[i];
let mut color = white;
@ -269,7 +269,7 @@ fn pbfs(&&graph: arc::ARC<graph>, key: node_id) -> bfs_result {
white => {
let i = i as node_id;
let neighbors = graph[i];
let neighbors = copy graph[i];
let mut color = white;
@ -438,7 +438,7 @@ fn main() {
if do_sequential {
let start = time::precise_time_s();
let bfs_tree = bfs(graph, *root);
let bfs_tree = bfs(copy graph, *root);
let stop = time::precise_time_s();
//total_seq += stop - start;
@ -449,7 +449,7 @@ fn main() {
if do_validate {
let start = time::precise_time_s();
assert(validate(edges, *root, bfs_tree));
assert(validate(copy edges, *root, bfs_tree));
let stop = time::precise_time_s();
io::stdout().write_line(
@ -458,7 +458,7 @@ fn main() {
}
let start = time::precise_time_s();
let bfs_tree = bfs2(graph, *root);
let bfs_tree = bfs2(copy graph, *root);
let stop = time::precise_time_s();
total_seq += stop - start;
@ -469,7 +469,7 @@ fn main() {
if do_validate {
let start = time::precise_time_s();
assert(validate(edges, *root, bfs_tree));
assert(validate(copy edges, *root, bfs_tree));
let stop = time::precise_time_s();
io::stdout().write_line(
@ -489,7 +489,7 @@ fn main() {
if do_validate {
let start = time::precise_time_s();
assert(validate(edges, *root, bfs_tree));
assert(validate(copy edges, *root, bfs_tree));
let stop = time::precise_time_s();
io::stdout().write_line(fmt!("Validation completed in %? seconds.",

View File

@ -132,7 +132,7 @@ fn creature(
fn rendezvous(nn: uint, set: ~[color]) {
pub fn spawn_listener<A: Send>(+f: fn~(oldcomm::Port<A>)) -> oldcomm::Chan<A> {
pub fn spawn_listener<A: Owned>(+f: fn~(oldcomm::Port<A>)) -> oldcomm::Chan<A> {
let setup_po = oldcomm::Port();
let setup_ch = oldcomm::Chan(&setup_po);
do task::spawn |move f| {

View File

@ -55,7 +55,7 @@ fn make_random_fasta(wr: io::Writer, id: ~str, desc: ~str, genelist: ~[aminoacid
let mut op: ~str = ~"";
for uint::range(0u, n as uint) |_i| {
str::push_char(&mut op, select_random(myrandom_next(rng, 100u32),
genelist));
copy genelist));
if str::len(op) >= LINE_LENGTH() {
wr.write_line(op);
op = ~"";

View File

@ -59,7 +59,7 @@ fn sort_and_fmt(mm: HashMap<~[u8], uint>, total: uint) -> ~str {
let mut buffer = ~"";
for pairs_sorted.each |kv| {
let (k,v) = *kv;
let (k,v) = copy *kv;
unsafe {
buffer += (fmt!("%s %0.3f\n", str::to_upper(str::raw::from_bytes(k)), v));
}
@ -198,7 +198,7 @@ fn main() {
let line_bytes = str::to_bytes(line);
for sizes.eachi |ii, _sz| {
let mut lb = line_bytes;
let mut lb = copy line_bytes;
to_child[ii].send(lb);
}
}

View File

@ -164,7 +164,7 @@ mod map_reduce {
let ctrl = box(move ctrl);
let i = copy *i;
let m = copy *map;
tasks.push(spawn_joinable(|move ctrl, move i| map_task(m, &ctrl, i)));
tasks.push(spawn_joinable(|move ctrl, move i| map_task(copy m, &ctrl, i)));
ctrls.push(move ctrl_server);
}
move tasks