about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/compiletest.rs6
-rw-r--r--src/compiletest/errors.rs6
-rw-r--r--src/compiletest/header.rs16
-rw-r--r--src/compiletest/procsrv.rs6
-rw-r--r--src/compiletest/runtest.rs18
5 files changed, 26 insertions, 26 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs
index 42d69566152..4fc88009bc6 100644
--- a/src/compiletest/compiletest.rs
+++ b/src/compiletest/compiletest.rs
@@ -47,7 +47,7 @@ fn parse_config(args: ~[~str]) -> config {
           err(f) { fail getopts::fail_str(f) }
         };
 
-    ret {compile_lib_path: getopts::opt_str(matches, ~"compile-lib-path"),
+    return {compile_lib_path: getopts::opt_str(matches, ~"compile-lib-path"),
          run_lib_path: getopts::opt_str(matches, ~"run-lib-path"),
          rustc_path: getopts::opt_str(matches, ~"rustc-path"),
          src_base: getopts::opt_str(matches, ~"src-base"),
@@ -143,7 +143,7 @@ fn make_tests(config: config) -> ~[test::test_desc] {
             vec::push(tests, make_test(config, file))
         }
     }
-    ret tests;
+    return tests;
 }
 
 fn is_test(config: config, testfile: ~str) -> bool {
@@ -163,7 +163,7 @@ fn is_test(config: config, testfile: ~str) -> bool {
         if str::starts_with(name, pre) { valid = false; }
     }
 
-    ret valid;
+    return valid;
 }
 
 fn make_test(config: config, testfile: ~str) ->
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs
index e44c80e79b9..431843d9268 100644
--- a/src/compiletest/errors.rs
+++ b/src/compiletest/errors.rs
@@ -17,14 +17,14 @@ fn load_errors(testfile: ~str) -> ~[expected_error] {
         error_patterns += parse_expected(line_num, ln);
         line_num += 1u;
     }
-    ret error_patterns;
+    return error_patterns;
 }
 
 fn parse_expected(line_num: uint, line: ~str) -> ~[expected_error] unsafe {
     let error_tag = ~"//~";
     let mut idx;
     alt str::find_str(line, error_tag) {
-         option::none { ret ~[]; }
+         option::none { return ~[]; }
          option::some(nn) { idx = (nn as uint) + str::len(error_tag); }
     }
 
@@ -49,5 +49,5 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[expected_error] unsafe {
 
     debug!{"line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg};
 
-    ret ~[{line: line_num - adjust_line, kind: kind, msg: msg}];
+    return ~[{line: line_num - adjust_line, kind: kind, msg: msg}];
 }
diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs
index c5101174424..ec214f5b586 100644
--- a/src/compiletest/header.rs
+++ b/src/compiletest/header.rs
@@ -51,7 +51,7 @@ fn load_props(testfile: ~str) -> test_props {
             vec::push(exec_env, ee);
         }
     };
-    ret {
+    return {
         error_patterns: error_patterns,
         compile_flags: compile_flags,
         pp_exact: pp_exact,
@@ -63,12 +63,12 @@ fn load_props(testfile: ~str) -> test_props {
 fn is_test_ignored(config: config, testfile: ~str) -> bool {
     let mut found = false;
     for iter_header(testfile) |ln| {
-        if parse_name_directive(ln, ~"xfail-test") { ret true; }
-        if parse_name_directive(ln, xfail_target()) { ret true; }
+        if parse_name_directive(ln, ~"xfail-test") { return true; }
+        if parse_name_directive(ln, xfail_target()) { return true; }
         if config.mode == common::mode_pretty &&
-           parse_name_directive(ln, ~"xfail-pretty") { ret true; }
+           parse_name_directive(ln, ~"xfail-pretty") { return true; }
     };
-    ret found;
+    return found;
 
     fn xfail_target() -> ~str {
         ~"xfail-" + os::sysname()
@@ -85,10 +85,10 @@ fn iter_header(testfile: ~str, it: fn(~str) -> bool) -> bool {
         // with a warm page cache. Maybe with a cold one.
         if str::starts_with(ln, ~"fn")
             || str::starts_with(ln, ~"mod") {
-            ret false;
-        } else { if !(it(ln)) { ret false; } }
+            return false;
+        } else { if !(it(ln)) { return false; } }
     }
-    ret true;
+    return true;
 }
 
 fn parse_error_pattern(line: ~str) -> option<~str> {
diff --git a/src/compiletest/procsrv.rs b/src/compiletest/procsrv.rs
index 35da5d2bc6d..1a642915cd5 100644
--- a/src/compiletest/procsrv.rs
+++ b/src/compiletest/procsrv.rs
@@ -21,7 +21,7 @@ fn target_env(lib_path: ~str, prog: ~str) -> ~[(~str,~str)] {
     if str::ends_with(prog, ~"rustc.exe") {
         vec::push(env, (~"RUST_THREADS", ~"1"));
     }
-    ret env;
+    return env;
 }
 
 #[cfg(target_os = "linux")]
@@ -84,7 +84,7 @@ fn run(lib_path: ~str,
         };
         count -= 1;
     };
-    ret {status: status, out: outs, err: errs};
+    return {status: status, out: outs, err: errs};
 }
 
 fn writeclose(fd: c_int, s: option<~str>) {
@@ -106,5 +106,5 @@ fn readclose(fd: c_int) -> ~str {
         buf += str::from_bytes(bytes);
     }
     os::fclose(file);
-    ret buf;
+    return buf;
 }
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index e708af2d6a3..ac5c3161c47 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -134,7 +134,7 @@ fn run_pretty_test(config: config, props: test_props, testfile: ~str) {
         fatal_procres(~"pretty-printed source does not typecheck", procres);
     }
 
-    ret;
+    return;
 
     fn print_source(config: config, testfile: ~str, src: ~str) -> procres {
         compose_and_run(config, testfile, make_pp_args(config, testfile),
@@ -144,7 +144,7 @@ fn run_pretty_test(config: config, props: test_props, testfile: ~str) {
     fn make_pp_args(config: config, _testfile: ~str) -> procargs {
         let prog = config.rustc_path;
         let args = ~[~"-", ~"--pretty", ~"normal"];
-        ret {prog: prog, args: args};
+        return {prog: prog, args: args};
     }
 
     fn compare_source(expected: ~str, actual: ~str) {
@@ -181,7 +181,7 @@ actual:\n\
                          ~"--no-trans", ~"--lib", ~"-L", config.build_base,
                          ~"-L", aux_output_dir_name(config, testfile)];
         args += split_maybe_args(config.rustcflags);
-        ret {prog: prog, args: args};
+        return {prog: prog, args: args};
     }
 }
 
@@ -211,7 +211,7 @@ fn check_error_patterns(props: test_props,
             next_err_pat = props.error_patterns[next_err_idx];
         }
     }
-    if done { ret; }
+    if done { return; }
 
     let missing_patterns =
         vec::slice(props.error_patterns, next_err_idx,
@@ -340,7 +340,7 @@ fn compose_and_run_compiler(
 }
 
 fn ensure_dir(path: path) {
-    if os::path_is_dir(path) { ret; }
+    if os::path_is_dir(path) { return; }
     if !os::make_dir(path, 0x1c0i32) {
         fail fmt!{"can't make dir %s", path};
     }
@@ -351,7 +351,7 @@ fn compose_and_run(config: config, testfile: ~str,
                    procenv: ~[(~str, ~str)],
                    lib_path: ~str,
                    input: option<~str>) -> procres {
-    ret program_output(config, testfile, lib_path,
+    return program_output(config, testfile, lib_path,
                        procargs.prog, procargs.args, procenv, input);
 }
 
@@ -363,7 +363,7 @@ fn make_compile_args(config: config, props: test_props, extras: ~[~str],
                     ~"-L", config.build_base] + extras;
     args += split_maybe_args(config.rustcflags);
     args += split_maybe_args(props.compile_flags);
-    ret {prog: prog, args: args};
+    return {prog: prog, args: args};
 }
 
 fn make_lib_name(config: config, auxfile: ~str, testfile: ~str) -> ~str {
@@ -391,7 +391,7 @@ fn make_run_args(config: config, _props: test_props, testfile: ~str) ->
         };
 
     let args = toolargs + ~[make_exe_name(config, testfile)];
-    ret {prog: args[0], args: vec::slice(args, 1u, vec::len(args))};
+    return {prog: args[0], args: vec::slice(args, 1u, vec::len(args))};
 }
 
 fn split_maybe_args(argstr: option<~str>) -> ~[~str] {
@@ -419,7 +419,7 @@ fn program_output(config: config, testfile: ~str, lib_path: ~str, prog: ~str,
         };
     let res = procsrv::run(lib_path, prog, args, env, input);
     dump_output(config, testfile, res.out, res.err);
-    ret {status: res.status,
+    return {status: res.status,
          stdout: res.out,
          stderr: res.err,
          cmdline: cmdline};