Skip to content

Commit 1be40be

Browse files
committed
test: Update tests to use the new syntax.
1 parent c10e0cb commit 1be40be

File tree

272 files changed

+565
-565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+565
-565
lines changed

src/test/auxiliary/cci_capture_clause.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::comm::*;
11+
use std::comm::*;
1212

1313
pub fn foo<T:Owned + Copy>(x: T) -> Port<T> {
1414
let (p, c) = stream();

src/test/auxiliary/cci_class_cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::to_str::*;
11+
use std::to_str::*;
1212

1313
pub mod kitty {
1414
pub struct cat {

src/test/auxiliary/issue-2526.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
uuid = "54cc1bc9-02b8-447c-a227-75ebc923bc29")];
1414
#[crate_type = "lib"];
1515

16-
extern mod std;
16+
extern mod extra;
1717

1818
struct arc_destruct<T> {
1919
_data: int,

src/test/auxiliary/issue-2631-a.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
#[link(name = "req")];
1212
#[crate_type = "lib"];
1313

14-
extern mod std;
14+
extern mod extra;
1515

16-
use core::hashmap::HashMap;
16+
use std::hashmap::HashMap;
1717

1818
pub type header_map = HashMap<~str, @mut ~[@~str]>;
1919

src/test/auxiliary/trait_inheritance_overloading_xc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::cmp::Eq;
11+
use std::cmp::Eq;
1212

1313
pub trait MyNum : Add<Self,Self> + Sub<Self,Self> + Mul<Self,Self> + Eq {
1414
}

src/test/bench/core-map.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
extern mod std;
11+
extern mod extra;
1212

13-
use core::io;
14-
use std::time;
15-
use std::treemap::TreeMap;
16-
use core::hashmap::{HashMap, HashSet};
17-
use core::trie::TrieMap;
18-
use core::rand::Rng;
13+
use std::io;
14+
use extra::time;
15+
use extra::treemap::TreeMap;
16+
use std::hashmap::{HashMap, HashSet};
17+
use std::trie::TrieMap;
18+
use std::rand::Rng;
1919

2020
fn timed(label: &str, f: &fn()) {
2121
let start = time::precise_time_s();
@@ -103,7 +103,7 @@ fn main() {
103103
let mut rand = vec::with_capacity(n_keys);
104104

105105
{
106-
let mut rng = core::rand::IsaacRng::new_seeded([1, 1, 1, 1, 1, 1, 1]);
106+
let mut rng = std::rand::IsaacRng::new_seeded([1, 1, 1, 1, 1, 1, 1]);
107107
let mut set = HashSet::new();
108108
while set.len() != n_keys {
109109
let next = rng.next() as uint;

src/test/bench/core-set.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
extern mod std;
12-
use core::hashmap::HashSet;
13-
use std::bitv::BitvSet;
14-
use std::treemap::TreeSet;
11+
extern mod extra;
12+
use std::hashmap::HashSet;
13+
use extra::bitv::BitvSet;
14+
use extra::treemap::TreeSet;
1515

1616
struct Results {
1717
sequential_ints: float,
@@ -24,9 +24,9 @@ struct Results {
2424
}
2525

2626
fn timed(result: &mut float, op: &fn()) {
27-
let start = std::time::precise_time_s();
27+
let start = extra::time::precise_time_s();
2828
op();
29-
let end = std::time::precise_time_s();
29+
let end = extra::time::precise_time_s();
3030
*result = (end - start);
3131
}
3232

@@ -168,21 +168,21 @@ fn main() {
168168
let mut results = empty_results();
169169
results.bench_int(&mut rng, num_keys, max, || HashSet::new::<uint>());
170170
results.bench_str(&mut rng, num_keys, || HashSet::new::<~str>());
171-
write_results("core::hashmap::HashSet", &results);
171+
write_results("std::hashmap::HashSet", &results);
172172
}
173173

174174
{
175175
let mut rng = rand::IsaacRng::new_seeded(seed);
176176
let mut results = empty_results();
177177
results.bench_int(&mut rng, num_keys, max, || TreeSet::new::<uint>());
178178
results.bench_str(&mut rng, num_keys, || TreeSet::new::<~str>());
179-
write_results("std::treemap::TreeSet", &results);
179+
write_results("extra::treemap::TreeSet", &results);
180180
}
181181

182182
{
183183
let mut rng = rand::IsaacRng::new_seeded(seed);
184184
let mut results = empty_results();
185185
results.bench_int(&mut rng, num_keys, max, || BitvSet::new());
186-
write_results("std::bitv::BitvSet", &results);
186+
write_results("extra::bitv::BitvSet", &results);
187187
}
188188
}

src/test/bench/core-std.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// Microbenchmarks for various functions in core and std
11+
// Microbenchmarks for various functions in std and extra
1212

13-
extern mod std;
13+
extern mod extra;
1414

15-
use std::time::precise_time_s;
16-
use core::rand::RngUtil;
17-
use core::util;
15+
use extra::time::precise_time_s;
16+
use std::rand::RngUtil;
17+
use std::util;
1818

1919
macro_rules! bench (
2020
($id:ident) => (maybe_run_test(argv, stringify!($id).to_owned(), $id))

src/test/bench/graph500-bfs.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ An implementation of the Graph500 Breadth First Search problem in Rust.
1616
1717
*/
1818

19-
extern mod std;
20-
use std::arc;
21-
use std::time;
22-
use std::deque::Deque;
23-
use std::par;
24-
use core::hashmap::HashSet;
25-
use core::int::abs;
26-
use core::rand::RngUtil;
19+
extern mod extra;
20+
use extra::arc;
21+
use extra::time;
22+
use extra::deque::Deque;
23+
use extra::par;
24+
use std::hashmap::HashSet;
25+
use std::int::abs;
26+
use std::rand::RngUtil;
2727

2828
type node_id = i64;
2929
type graph = ~[~[node_id]];

src/test/bench/msgsend-pipes-shared.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
// different scalability characteristics compared to the select
1919
// version.
2020

21-
extern mod std;
22-
use core::io::Writer;
23-
use core::io::WriterUtil;
21+
extern mod extra;
22+
use std::io::Writer;
23+
use std::io::WriterUtil;
2424

25-
use core::comm::{Port, Chan, SharedChan};
25+
use std::comm::{Port, Chan, SharedChan};
2626

2727
macro_rules! move_out (
2828
{ $x:expr } => { unsafe { let y = *ptr::to_unsafe_ptr(&($x)); y } }
@@ -61,7 +61,7 @@ fn run(args: &[~str]) {
6161
let size = uint::from_str(args[1]).get();
6262
let workers = uint::from_str(args[2]).get();
6363
let num_bytes = 100;
64-
let start = std::time::precise_time_s();
64+
let start = extra::time::precise_time_s();
6565
let mut worker_results = ~[];
6666
for uint::range(0, workers) |_i| {
6767
let to_child = to_child.clone();
@@ -87,7 +87,7 @@ fn run(args: &[~str]) {
8787
to_child.send(stop);
8888
move_out!(to_child);
8989
let result = from_child.recv();
90-
let end = std::time::precise_time_s();
90+
let end = extra::time::precise_time_s();
9191
let elapsed = end - start;
9292
io::stdout().write_str(fmt!("Count is %?\n", result));
9393
io::stdout().write_str(fmt!("Test took %? seconds\n", elapsed));

0 commit comments

Comments
 (0)