about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-09-21 19:37:57 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-23 17:15:00 -0700
commit4a78f9b16620489855da93c19be56f59431416f6 (patch)
tree4b164738698203f474003682d5f0a5e23aa13377 /src/compiletest
parent92752a462a055d6478bd96dab37a740514992106 (diff)
downloadrust-4a78f9b16620489855da93c19be56f59431416f6.tar.gz
rust-4a78f9b16620489855da93c19be56f59431416f6.zip
core: Demode option
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/compiletest.rs4
-rw-r--r--src/compiletest/header.rs8
-rw-r--r--src/compiletest/procsrv.rs4
-rw-r--r--src/compiletest/runtest.rs6
4 files changed, 11 insertions, 11 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs
index 6bb0f6cd02a..1e6c008421d 100644
--- a/src/compiletest/compiletest.rs
+++ b/src/compiletest/compiletest.rs
@@ -56,7 +56,7 @@ fn parse_config(args: ~[~str]) -> config {
              if vec::len(matches.free) > 0u {
                  option::Some(matches.free[0])
              } else { option::None },
-         logfile: option::map(getopts::opt_maybe_str(matches,
+         logfile: option::map(&getopts::opt_maybe_str(matches,
                                                      ~"logfile"),
                               |s| Path(s)),
          runtool: getopts::opt_maybe_str(matches, ~"runtool"),
@@ -155,7 +155,7 @@ fn is_test(config: config, testfile: &Path) -> bool {
           _ => ~[~".rc", ~".rs"]
         };
     let invalid_prefixes = ~[~".", ~"#", ~"~"];
-    let name = option::get(testfile.filename());
+    let name = testfile.filename().get();
 
     let mut valid = false;
 
diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs
index 521b603f1b4..4ff1b8e9c78 100644
--- a/src/compiletest/header.rs
+++ b/src/compiletest/header.rs
@@ -32,19 +32,19 @@ fn load_props(testfile: &Path) -> test_props {
           option::None => ()
         };
 
-        if option::is_none(compile_flags) {
+        if compile_flags.is_none() {
             compile_flags = parse_compile_flags(ln);
         }
 
-        if option::is_none(pp_exact) {
+        if pp_exact.is_none() {
             pp_exact = parse_pp_exact(ln, testfile);
         }
 
-        do option::iter(parse_aux_build(ln)) |ab| {
+        do parse_aux_build(ln).iter |ab| {
             vec::push(aux_builds, ab);
         }
 
-        do option::iter(parse_exec_env(ln)) |ee| {
+        do parse_exec_env(ln).iter |ee| {
             vec::push(exec_env, ee);
         }
     };
diff --git a/src/compiletest/procsrv.rs b/src/compiletest/procsrv.rs
index 39076b70029..d62f2fe5837 100644
--- a/src/compiletest/procsrv.rs
+++ b/src/compiletest/procsrv.rs
@@ -89,9 +89,9 @@ fn run(lib_path: ~str,
 }
 
 fn writeclose(fd: c_int, s: Option<~str>) {
-    if option::is_some(s) {
+    if s.is_some() {
         let writer = io::fd_writer(fd, false);
-        writer.write_str(option::get(s));
+        writer.write_str(s.get());
     }
 
     os::close(fd);
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index a6437598acf..1c69e511137 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -102,7 +102,7 @@ fn run_rpass_test(config: config, props: test_props, testfile: &Path) {
 }
 
 fn run_pretty_test(config: config, props: test_props, testfile: &Path) {
-    if option::is_some(props.pp_exact) {
+    if props.pp_exact.is_some() {
         logv(config, ~"testing for exact pretty-printing");
     } else { logv(config, ~"testing for converging pretty-printing"); }
 
@@ -135,7 +135,7 @@ fn run_pretty_test(config: config, props: test_props, testfile: &Path) {
         };
     let mut actual = srcs[vec::len(srcs) - 1u];
 
-    if option::is_some(props.pp_exact) {
+    if props.pp_exact.is_some() {
         // Now we have to care about line endings
         let cr = ~"\r";
         actual = str::replace(actual, cr, ~"");
@@ -575,7 +575,7 @@ fn aux_output_dir_name(config: config, testfile: &Path) -> Path {
 }
 
 fn output_testname(testfile: &Path) -> Path {
-    Path(option::get(testfile.filestem()))
+    Path(testfile.filestem().get())
 }
 
 fn output_base_name(config: config, testfile: &Path) -> Path {