test: fix seeded_rng uses

This commit is contained in:
Graydon Hoare 2013-02-19 08:56:37 -08:00
parent acc147769e
commit 2ec958db5a
2 changed files with 8 additions and 8 deletions

View File

@ -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);

View File

@ -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);