about summary refs log tree commit diff
path: root/src/test
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/test
parent92752a462a055d6478bd96dab37a740514992106 (diff)
downloadrust-4a78f9b16620489855da93c19be56f59431416f6.tar.gz
rust-4a78f9b16620489855da93c19be56f59431416f6.zip
core: Demode option
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench/msgsend-pipes-shared.rs4
-rw-r--r--src/test/bench/msgsend-pipes.rs4
-rw-r--r--src/test/bench/msgsend-ring-mutex-arcs.rs4
-rw-r--r--src/test/bench/msgsend-ring-pipes.rs4
-rw-r--r--src/test/bench/msgsend-ring-rw-arcs.rs4
-rw-r--r--src/test/bench/msgsend-ring.rs4
-rw-r--r--src/test/bench/msgsend.rs4
-rw-r--r--src/test/bench/shootout-pfib.rs4
-rw-r--r--src/test/bench/sudoku.rs6
-rw-r--r--src/test/run-pass/test-ignore-cfg.rs4
10 files changed, 21 insertions, 21 deletions
diff --git a/src/test/bench/msgsend-pipes-shared.rs b/src/test/bench/msgsend-pipes-shared.rs
index 0bae172f93c..2326c06f280 100644
--- a/src/test/bench/msgsend-pipes-shared.rs
+++ b/src/test/bench/msgsend-pipes-shared.rs
@@ -52,8 +52,8 @@ fn run(args: &[~str]) {
 
     let to_child = SharedChan(to_child);
 
-    let size = option::get(uint::from_str(args[1]));
-    let workers = option::get(uint::from_str(args[2]));
+    let size = uint::from_str(args[1]).get();
+    let workers = uint::from_str(args[2]).get();
     let num_bytes = 100;
     let start = std::time::precise_time_s();
     let mut worker_results = ~[];
diff --git a/src/test/bench/msgsend-pipes.rs b/src/test/bench/msgsend-pipes.rs
index b9be61edc21..6d47c2a7378 100644
--- a/src/test/bench/msgsend-pipes.rs
+++ b/src/test/bench/msgsend-pipes.rs
@@ -48,8 +48,8 @@ fn run(args: &[~str]) {
     let from_parent = PortSet();
     from_parent.add(from_parent_);
 
-    let size = option::get(uint::from_str(args[1]));
-    let workers = option::get(uint::from_str(args[2]));
+    let size = uint::from_str(args[1]).get();
+    let workers = uint::from_str(args[2]).get();
     let num_bytes = 100;
     let start = std::time::precise_time_s();
     let mut worker_results = ~[];
diff --git a/src/test/bench/msgsend-ring-mutex-arcs.rs b/src/test/bench/msgsend-ring-mutex-arcs.rs
index ca76835dadd..3bc88fdcae1 100644
--- a/src/test/bench/msgsend-ring-mutex-arcs.rs
+++ b/src/test/bench/msgsend-ring-mutex-arcs.rs
@@ -65,8 +65,8 @@ fn main(args: ~[~str]) {
         copy args
     }; 
 
-    let num_tasks = option::get(uint::from_str(args[1]));
-    let msg_per_task = option::get(uint::from_str(args[2]));
+    let num_tasks = uint::from_str(args[1]).get();
+    let msg_per_task = uint::from_str(args[2]).get();
 
     let (num_chan, num_port) = init();
     let mut num_chan = Some(num_chan);
diff --git a/src/test/bench/msgsend-ring-pipes.rs b/src/test/bench/msgsend-ring-pipes.rs
index 9fa30af4bde..25532fb46a6 100644
--- a/src/test/bench/msgsend-ring-pipes.rs
+++ b/src/test/bench/msgsend-ring-pipes.rs
@@ -61,8 +61,8 @@ fn main(args: ~[~str]) {
         copy args
     }; 
 
-    let num_tasks = option::get(uint::from_str(args[1]));
-    let msg_per_task = option::get(uint::from_str(args[2]));
+    let num_tasks = uint::from_str(args[1]).get();
+    let msg_per_task = uint::from_str(args[2]).get();
 
     let (num_chan, num_port) = ring::init();
     let mut num_chan = Some(num_chan);
diff --git a/src/test/bench/msgsend-ring-rw-arcs.rs b/src/test/bench/msgsend-ring-rw-arcs.rs
index 77e5d7c8b67..0b444101845 100644
--- a/src/test/bench/msgsend-ring-rw-arcs.rs
+++ b/src/test/bench/msgsend-ring-rw-arcs.rs
@@ -65,8 +65,8 @@ fn main(args: ~[~str]) {
         copy args
     }; 
 
-    let num_tasks = option::get(uint::from_str(args[1]));
-    let msg_per_task = option::get(uint::from_str(args[2]));
+    let num_tasks = uint::from_str(args[1]).get();
+    let msg_per_task = uint::from_str(args[2]).get();
 
     let (num_chan, num_port) = init();
     let mut num_chan = Some(num_chan);
diff --git a/src/test/bench/msgsend-ring.rs b/src/test/bench/msgsend-ring.rs
index f07b7e7fbde..719ab1b00ba 100644
--- a/src/test/bench/msgsend-ring.rs
+++ b/src/test/bench/msgsend-ring.rs
@@ -30,8 +30,8 @@ fn main(args: ~[~str]) {
         args
     };        
 
-    let num_tasks = option::get(uint::from_str(args[1]));
-    let msg_per_task = option::get(uint::from_str(args[2]));
+    let num_tasks = uint::from_str(args[1]).get();
+    let msg_per_task = uint::from_str(args[2]).get();
 
     let num_port = Port();
     let mut num_chan = Chan(num_port);
diff --git a/src/test/bench/msgsend.rs b/src/test/bench/msgsend.rs
index c19138acd28..1b2c926508f 100644
--- a/src/test/bench/msgsend.rs
+++ b/src/test/bench/msgsend.rs
@@ -31,8 +31,8 @@ fn run(args: ~[~str]) {
     let (from_child, to_child) = do task::spawn_conversation |po, ch| {
         server(po, ch);
     };
-    let size = option::get(uint::from_str(args[1]));
-    let workers = option::get(uint::from_str(args[2]));
+    let size = uint::from_str(args[1]).get();
+    let workers = uint::from_str(args[2]).get();
     let start = std::time::precise_time_s();
     let mut worker_results = ~[];
     for uint::range(0u, workers) |_i| {
diff --git a/src/test/bench/shootout-pfib.rs b/src/test/bench/shootout-pfib.rs
index 9740e5adc1d..4796fdc5b11 100644
--- a/src/test/bench/shootout-pfib.rs
+++ b/src/test/bench/shootout-pfib.rs
@@ -95,8 +95,8 @@ fn main(args: ~[~str]) {
     if opts.stress {
         stress(2);
     } else {
-        let max = option::get(uint::parse_bytes(str::to_bytes(args[1]),
-                                                10u)) as int;
+        let max = uint::parse_bytes(str::to_bytes(args[1]),
+                                                10u).get() as int;
 
         let num_trials = 10;
 
diff --git a/src/test/bench/sudoku.rs b/src/test/bench/sudoku.rs
index c03db79e3d2..eae905079ff 100644
--- a/src/test/bench/sudoku.rs
+++ b/src/test/bench/sudoku.rs
@@ -37,9 +37,9 @@ fn read_grid(f: io::Reader) -> grid_t {
     while !f.eof() {
         let comps = str::split_char(str::trim(f.read_line()), ',');
         if vec::len(comps) >= 3u {
-            let row     = option::get(uint::from_str(comps[0])) as u8;
-            let col     = option::get(uint::from_str(comps[1])) as u8;
-            g[row][col] = option::get(uint::from_str(comps[2])) as u8;
+            let row     = uint::from_str(comps[0]).get() as u8;
+            let col     = uint::from_str(comps[1]).get() as u8;
+            g[row][col] = uint::from_str(comps[2]).get() as u8;
         }
     }
     return grid_ctor(g);
diff --git a/src/test/run-pass/test-ignore-cfg.rs b/src/test/run-pass/test-ignore-cfg.rs
index 0baabecb0ab..0482fc278c8 100644
--- a/src/test/run-pass/test-ignore-cfg.rs
+++ b/src/test/run-pass/test-ignore-cfg.rs
@@ -20,10 +20,10 @@ fn checktests() {
     let tests = __test::tests();
 
     let shouldignore = option::get(
-        vec::find(tests, |t| t.name == ~"shouldignore" ));
+        &vec::find(tests, |t| t.name == ~"shouldignore" ));
     assert shouldignore.ignore == true;
 
     let shouldnotignore = option::get(
-        vec::find(tests, |t| t.name == ~"shouldnotignore" ));
+        &vec::find(tests, |t| t.name == ~"shouldnotignore" ));
     assert shouldnotignore.ignore == false;
 }
\ No newline at end of file