mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
test: fix seeded_rng uses
This commit is contained in:
parent
acc147769e
commit
2ec958db5a
@ -302,10 +302,10 @@ fn main() {
|
||||
}
|
||||
};
|
||||
|
||||
let seed = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||
let seed = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||
|
||||
{
|
||||
let rng = rand::seeded_rng(&seed);
|
||||
let rng = rand::seeded_rng(seed);
|
||||
let mut results = empty_results();
|
||||
old_int_benchmarks(rng, num_keys, &mut results);
|
||||
old_str_benchmarks(rng, num_keys, &mut results);
|
||||
@ -313,7 +313,7 @@ fn main() {
|
||||
}
|
||||
|
||||
{
|
||||
let rng = rand::seeded_rng(&seed);
|
||||
let rng = rand::seeded_rng(seed);
|
||||
let mut results = empty_results();
|
||||
linear_int_benchmarks(rng, num_keys, &mut results);
|
||||
linear_str_benchmarks(rng, num_keys, &mut results);
|
||||
@ -321,7 +321,7 @@ fn main() {
|
||||
}
|
||||
|
||||
{
|
||||
let rng = rand::seeded_rng(&seed);
|
||||
let rng = rand::seeded_rng(seed);
|
||||
let mut results = empty_results();
|
||||
tree_int_benchmarks(rng, num_keys, &mut results);
|
||||
tree_str_benchmarks(rng, num_keys, &mut results);
|
||||
|
@ -152,11 +152,11 @@ fn main() {
|
||||
}
|
||||
};
|
||||
|
||||
let seed = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||
let seed = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||
let max = 200000;
|
||||
|
||||
{
|
||||
let rng = rand::seeded_rng(&seed);
|
||||
let rng = rand::seeded_rng(seed);
|
||||
let mut results = empty_results();
|
||||
results.bench_int(rng, num_keys, max, || LinearSet::new::<uint>());
|
||||
results.bench_str(rng, num_keys, || LinearSet::new::<~str>());
|
||||
@ -164,7 +164,7 @@ fn main() {
|
||||
}
|
||||
|
||||
{
|
||||
let rng = rand::seeded_rng(&seed);
|
||||
let rng = rand::seeded_rng(seed);
|
||||
let mut results = empty_results();
|
||||
results.bench_int(rng, num_keys, max, || TreeSet::new::<uint>());
|
||||
results.bench_str(rng, num_keys, || TreeSet::new::<~str>());
|
||||
@ -172,7 +172,7 @@ fn main() {
|
||||
}
|
||||
|
||||
{
|
||||
let rng = rand::seeded_rng(&seed);
|
||||
let rng = rand::seeded_rng(seed);
|
||||
let mut results = empty_results();
|
||||
results.bench_int(rng, num_keys, max, || BitvSet::new());
|
||||
write_results("std::bitv::BitvSet", &results);
|
||||
|
Loading…
Reference in New Issue
Block a user