Skip to content

Commit a9601bc

Browse files
committed
Fix broken tests
1 parent 47faeb9 commit a9601bc

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/test/bench/graph500-bfs.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ fn bfs2(graph: graph, key: node_id) -> bfs_result {
188188
white => {
189189
let i = i as node_id;
190190

191-
let neighbors = graph[i];
191+
let neighbors = copy graph[i];
192192

193193
let mut color = white;
194194

@@ -269,7 +269,7 @@ fn pbfs(&&graph: arc::ARC<graph>, key: node_id) -> bfs_result {
269269
white => {
270270
let i = i as node_id;
271271

272-
let neighbors = graph[i];
272+
let neighbors = copy graph[i];
273273

274274
let mut color = white;
275275

@@ -438,7 +438,7 @@ fn main() {
438438

439439
if do_sequential {
440440
let start = time::precise_time_s();
441-
let bfs_tree = bfs(graph, *root);
441+
let bfs_tree = bfs(copy graph, *root);
442442
let stop = time::precise_time_s();
443443

444444
//total_seq += stop - start;
@@ -449,7 +449,7 @@ fn main() {
449449

450450
if do_validate {
451451
let start = time::precise_time_s();
452-
assert(validate(edges, *root, bfs_tree));
452+
assert(validate(copy edges, *root, bfs_tree));
453453
let stop = time::precise_time_s();
454454

455455
io::stdout().write_line(
@@ -458,7 +458,7 @@ fn main() {
458458
}
459459

460460
let start = time::precise_time_s();
461-
let bfs_tree = bfs2(graph, *root);
461+
let bfs_tree = bfs2(copy graph, *root);
462462
let stop = time::precise_time_s();
463463

464464
total_seq += stop - start;
@@ -469,7 +469,7 @@ fn main() {
469469

470470
if do_validate {
471471
let start = time::precise_time_s();
472-
assert(validate(edges, *root, bfs_tree));
472+
assert(validate(copy edges, *root, bfs_tree));
473473
let stop = time::precise_time_s();
474474

475475
io::stdout().write_line(
@@ -489,7 +489,7 @@ fn main() {
489489

490490
if do_validate {
491491
let start = time::precise_time_s();
492-
assert(validate(edges, *root, bfs_tree));
492+
assert(validate(copy edges, *root, bfs_tree));
493493
let stop = time::precise_time_s();
494494

495495
io::stdout().write_line(fmt!("Validation completed in %? seconds.",

src/test/bench/shootout-chameneos-redux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn creature(
132132
133133
fn rendezvous(nn: uint, set: ~[color]) {
134134
135-
pub fn spawn_listener<A: Send>(+f: fn~(oldcomm::Port<A>)) -> oldcomm::Chan<A> {
135+
pub fn spawn_listener<A: Owned>(+f: fn~(oldcomm::Port<A>)) -> oldcomm::Chan<A> {
136136
let setup_po = oldcomm::Port();
137137
let setup_ch = oldcomm::Chan(&setup_po);
138138
do task::spawn |move f| {

src/test/bench/shootout-fasta.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn make_random_fasta(wr: io::Writer, id: ~str, desc: ~str, genelist: ~[aminoacid
5555
let mut op: ~str = ~"";
5656
for uint::range(0u, n as uint) |_i| {
5757
str::push_char(&mut op, select_random(myrandom_next(rng, 100u32),
58-
genelist));
58+
copy genelist));
5959
if str::len(op) >= LINE_LENGTH() {
6060
wr.write_line(op);
6161
op = ~"";

src/test/bench/shootout-k-nucleotide-pipes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fn sort_and_fmt(mm: HashMap<~[u8], uint>, total: uint) -> ~str {
5959
let mut buffer = ~"";
6060

6161
for pairs_sorted.each |kv| {
62-
let (k,v) = *kv;
62+
let (k,v) = copy *kv;
6363
unsafe {
6464
buffer += (fmt!("%s %0.3f\n", str::to_upper(str::raw::from_bytes(k)), v));
6565
}
@@ -198,7 +198,7 @@ fn main() {
198198
let line_bytes = str::to_bytes(line);
199199

200200
for sizes.eachi |ii, _sz| {
201-
let mut lb = line_bytes;
201+
let mut lb = copy line_bytes;
202202
to_child[ii].send(lb);
203203
}
204204
}

src/test/bench/task-perf-word-count-generic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ mod map_reduce {
164164
let ctrl = box(move ctrl);
165165
let i = copy *i;
166166
let m = copy *map;
167-
tasks.push(spawn_joinable(|move ctrl, move i| map_task(m, &ctrl, i)));
167+
tasks.push(spawn_joinable(|move ctrl, move i| map_task(copy m, &ctrl, i)));
168168
ctrls.push(move ctrl_server);
169169
}
170170
move tasks

0 commit comments

Comments
 (0)