1
Fork 0

Convert alt to match. Stop parsing alt

This commit is contained in:
Brian Anderson 2012-08-06 12:34:08 -07:00
parent d3a9bb1bd4
commit ecaf9e39c9
359 changed files with 2938 additions and 2915 deletions

View file

@ -18,7 +18,7 @@ fn run(config: config, testfile: ~str) {
}
debug!{"running %s", testfile};
let props = load_props(testfile);
alt config.mode {
match config.mode {
mode_compile_fail => run_cfail_test(config, props, testfile),
mode_run_fail => run_rfail_test(config, props, testfile),
mode_run_pass => run_rpass_test(config, props, testfile),
@ -90,7 +90,7 @@ fn run_pretty_test(config: config, props: test_props, testfile: ~str) {
} else { logv(config, ~"testing for converging pretty-printing"); }
let rounds =
alt props.pp_exact { option::some(_) => 1, option::none => 2 };
match props.pp_exact { option::some(_) => 1, option::none => 2 };
let mut srcs = ~[result::get(io::read_whole_file_str(testfile))];
@ -109,7 +109,7 @@ fn run_pretty_test(config: config, props: test_props, testfile: ~str) {
}
let mut expected =
alt props.pp_exact {
match props.pp_exact {
option::some(file) => {
let filepath = path::connect(path::dirname(testfile), file);
result::get(io::read_whole_file_str(filepath))
@ -383,7 +383,7 @@ fn make_run_args(config: config, _props: test_props, testfile: ~str) ->
// If we've got another tool to run under (valgrind),
// then split apart its command
let runtool =
alt config.runtool {
match config.runtool {
option::some(s) => option::some(s),
option::none => option::none
};
@ -402,7 +402,7 @@ fn split_maybe_args(argstr: option<~str>) -> ~[~str] {
vec::filter_map(v, flt)
}
alt argstr {
match argstr {
option::some(s) => rm_whitespace(str::split_char(s, ' ')),
option::none => ~[]
}