diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-21 13:08:31 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-10-22 08:09:56 -0700 |
| commit | daf5f5a4d10513ff42e79fa7ef8819b170f3a13d (patch) | |
| tree | 7a07a79c43e02debcc6bbb33d90a5e41b70119e6 /src/compiletest | |
| parent | 15a6bdebab4e7b811b9a902e3f8ed225c59af06e (diff) | |
| download | rust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.tar.gz rust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.zip | |
Drop the '2' suffix from logging macros
Who doesn't like a massive renaming?
Diffstat (limited to 'src/compiletest')
| -rw-r--r-- | src/compiletest/compiletest.rs | 14 | ||||
| -rw-r--r-- | src/compiletest/errors.rs | 2 | ||||
| -rw-r--r-- | src/compiletest/header.rs | 4 | ||||
| -rw-r--r-- | src/compiletest/runtest.rs | 20 | ||||
| -rw-r--r-- | src/compiletest/util.rs | 4 |
5 files changed, 22 insertions, 22 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 362d2ba749d..7f5a72e8a2c 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -85,20 +85,20 @@ pub fn parse_config(args: ~[~str]) -> config { let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0); println(getopts::groups::usage(message, groups)); println(""); - fail2!() + fail!() } let matches = &match getopts::groups::getopts(args_, groups) { Ok(m) => m, - Err(f) => fail2!("{}", f.to_err_msg()) + Err(f) => fail!("{}", f.to_err_msg()) }; if matches.opt_present("h") || matches.opt_present("help") { let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0); println(getopts::groups::usage(message, groups)); println(""); - fail2!() + fail!() } fn opt_path(m: &getopts::Matches, nm: &str) -> Path { @@ -203,7 +203,7 @@ pub fn str_mode(s: ~str) -> mode { ~"pretty" => mode_pretty, ~"debug-info" => mode_debug_info, ~"codegen" => mode_codegen, - _ => fail2!("invalid mode") + _ => fail!("invalid mode") } } @@ -226,7 +226,7 @@ pub fn run_tests(config: &config) { // For context, see #8904 rt::test::prepare_for_lots_of_tests(); let res = test::run_tests_console(&opts, tests); - if !res { fail2!("Some tests failed"); } + if !res { fail!("Some tests failed"); } } pub fn test_opts(config: &config) -> test::TestOpts { @@ -244,13 +244,13 @@ pub fn test_opts(config: &config) -> test::TestOpts { } pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] { - debug2!("making tests from {}", + debug!("making tests from {}", config.src_base.display()); let mut tests = ~[]; let dirs = os::list_dir_path(&config.src_base); for file in dirs.iter() { let file = file.clone(); - debug2!("inspecting file {}", file.display()); + debug!("inspecting file {}", file.display()); if is_test(config, &file) { let t = do make_test(config, &file) { match config.mode { diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs index e49a9701460..0c94ec8ab8a 100644 --- a/src/compiletest/errors.rs +++ b/src/compiletest/errors.rs @@ -61,7 +61,7 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] { while idx < len && line[idx] == (' ' as u8) { idx += 1u; } let msg = line.slice(idx, len).to_owned(); - debug2!("line={} kind={} msg={}", line_num - adjust_line, kind, msg); + debug!("line={} kind={} msg={}", line_num - adjust_line, kind, msg); return ~[ExpectedError{line: line_num - adjust_line, kind: kind, msg: msg}]; diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index 541aa082f51..368c96ffe85 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -154,7 +154,7 @@ fn parse_exec_env(line: &str) -> Option<(~str, ~str)> { let end = strs.pop(); (strs.pop(), end) } - n => fail2!("Expected 1 or 2 strings, not {}", n) + n => fail!("Expected 1 or 2 strings, not {}", n) } } } @@ -183,7 +183,7 @@ fn parse_name_value_directive(line: &str, Some(colon) => { let value = line.slice(colon + keycolon.len(), line.len()).to_owned(); - debug2!("{}: {}", directive, value); + debug!("{}: {}", directive, value); Some(value) } None => None diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 627a80ace69..d02b88ae74e 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -63,9 +63,9 @@ pub fn run_metrics(config: config, testfile: ~str, mm: &mut MetricMap) { io::stdout().write_str("\n\n"); } let testfile = Path::new(testfile); - debug2!("running {}", testfile.display()); + debug!("running {}", testfile.display()); let props = load_props(&testfile); - debug2!("loaded props"); + debug!("loaded props"); match config.mode { mode_compile_fail => run_cfail_test(&config, &props, &testfile), mode_run_fail => run_rfail_test(&config, &props, &testfile), @@ -241,7 +241,7 @@ actual:\n\ \n", expected, actual); io::stdout().write_str(msg); - fail2!(); + fail!(); } } @@ -289,7 +289,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) { let script_str = [~"set charset UTF-8", cmds, ~"quit\n"].connect("\n"); - debug2!("script_str = {}", script_str); + debug!("script_str = {}", script_str); dump_output_file(config, testfile, script_str, "debugger.script"); // run debugger script with gdb @@ -348,10 +348,10 @@ fn check_error_patterns(props: &TestProps, let mut done = false; for line in ProcRes.stderr.line_iter() { if line.contains(*next_err_pat) { - debug2!("found error pattern {}", *next_err_pat); + debug!("found error pattern {}", *next_err_pat); next_err_idx += 1u; if next_err_idx == props.error_patterns.len() { - debug2!("found all error patterns"); + debug!("found all error patterns"); done = true; break; } @@ -423,7 +423,7 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError], let mut was_expected = false; for (i, ee) in expected_errors.iter().enumerate() { if !found_flags[i] { - debug2!("prefix={} ee.kind={} ee.msg={} line={}", + debug!("prefix={} ee.kind={} ee.msg={} line={}", prefixes[i], ee.kind, ee.msg, line); if (prefix_matches(line, prefixes[i]) && line.contains(ee.kind) && @@ -626,7 +626,7 @@ fn compose_and_run_compiler( fn ensure_dir(path: &Path) { if os::path_is_dir(path) { return; } if !os::make_dir(path, 0x1c0i32) { - fail2!("can't make dir {}", path.display()); + fail!("can't make dir {}", path.display()); } } @@ -784,7 +784,7 @@ fn maybe_dump_to_stdout(config: &config, out: &str, err: &str) { fn error(err: ~str) { io::stdout().write_line(format!("\nerror: {}", err)); } -fn fatal(err: ~str) -> ! { error(err); fail2!(); } +fn fatal(err: ~str) -> ! { error(err); fail!(); } fn fatal_ProcRes(err: ~str, ProcRes: &ProcRes) -> ! { let msg = @@ -802,7 +802,7 @@ stderr:\n\ \n", err, ProcRes.cmdline, ProcRes.stdout, ProcRes.stderr); io::stdout().write_str(msg); - fail2!(); + fail!(); } fn _arm_exec_compiled_test(config: &config, props: &TestProps, diff --git a/src/compiletest/util.rs b/src/compiletest/util.rs index 59b8ba1c7ff..04ef180299d 100644 --- a/src/compiletest/util.rs +++ b/src/compiletest/util.rs @@ -29,7 +29,7 @@ pub fn get_os(triple: &str) -> &'static str { return os } } - fail2!("Cannot determine OS from triple"); + fail!("Cannot determine OS from triple"); } pub fn make_new_path(path: &str) -> ~str { @@ -63,6 +63,6 @@ pub fn path_div() -> ~str { ~":" } pub fn path_div() -> ~str { ~";" } pub fn logv(config: &config, s: ~str) { - debug2!("{}", s); + debug!("{}", s); if config.verbose { io::println(s); } } |
