Upgrade to rustc ba2f13ef0 2015-02-04

This commit is contained in:
Simon Sapin 2015-01-31 14:36:05 +01:00 committed by Matt Brubeck
parent bc6882bdef
commit d5dd1d658e
136 changed files with 1091 additions and 878 deletions

View file

@ -8,23 +8,22 @@
// except according to those terms.
extern crate getopts;
extern crate regex;
extern crate test;
use test::{AutoColor, TestOpts, run_tests_console, TestDesc, TestDescAndFn, DynTestFn, DynTestName};
use test::ShouldFail;
use getopts::{getopts, reqopt};
use std::{os, str};
use std::io::fs;
use std::io::Reader;
use std::io::process::{Command, Ignored, CreatePipe, InheritFd, ExitStatus};
use std::old_io::fs;
use std::old_io::Reader;
use std::old_io::process::{Command, Ignored, CreatePipe, InheritFd, ExitStatus};
use std::old_path::Path;
use std::thunk::Thunk;
use regex::Regex;
#[derive(Clone)]
struct Config {
source_dir: String,
filter: Option<Regex>
filter: Option<String>
}
fn main() {
@ -49,7 +48,7 @@ fn parse_config(args: Vec<String>) -> Config {
Config {
source_dir: matches.opt_str("source-dir").unwrap(),
filter: matches.free.as_slice().first().map(|&:s| Regex::new(s.as_slice()).unwrap())
filter: matches.free.first().map(|s| s.clone())
}
}
@ -59,16 +58,9 @@ fn test_options(config: Config) -> TestOpts {
run_ignored: false,
run_tests: true,
run_benchmarks: false,
ratchet_metrics: None,
ratchet_noise_percent: None,
save_metrics: None,
test_shard: None,
logfile: None,
nocapture: false,
color: AutoColor,
show_boxplot: false,
boxplot_width: 0,
show_all_stats: false,
}
}
@ -89,7 +81,7 @@ fn make_test(file: String) -> TestDescAndFn {
ignore: false,
should_fail: ShouldFail::No,
},
testfn: DynTestFn(Thunk::new(move |:| { run_test(file) }))
testfn: DynTestFn(Thunk::new(move || { run_test(file) }))
}
}