Skip to content
Browse files

Fix broken tests

  • Loading branch information...
1 parent 47faeb9 commit a9601bce10ac5d037b0d1ce532196f08f4b7fd95 @brson brson committed
View
14 src/test/bench/graph500-bfs.rs
@@ -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
2 src/test/bench/shootout-chameneos-redux.rs
@@ -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
2 src/test/bench/shootout-fasta.rs
@@ -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
4 src/test/bench/shootout-k-nucleotide-pipes.rs
@@ -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
2 src/test/bench/task-perf-word-count-generic.rs
@@ -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

0 comments on commit a9601bc

Please sign in to comment.
Something went wrong with that request. Please try again.