about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/auxiliary/issue-17718.rs4
-rw-r--r--src/test/bench/shootout-binarytrees.rs10
-rw-r--r--src/test/bench/shootout-fannkuch-redux.rs8
-rw-r--r--src/test/compile-fail/std-uncopyable-atomics.rs6
-rw-r--r--src/test/run-pass/issue-17718.rs4
-rw-r--r--src/test/run-pass/vector-sort-panic-safe.rs20
6 files changed, 26 insertions, 26 deletions
diff --git a/src/test/auxiliary/issue-17718.rs b/src/test/auxiliary/issue-17718.rs
index f0b431b1db9..689610d799e 100644
--- a/src/test/auxiliary/issue-17718.rs
+++ b/src/test/auxiliary/issue-17718.rs
@@ -11,12 +11,12 @@
 use std::sync::atomic;
 
 pub const C1: uint = 1;
-pub const C2: atomic::AtomicUint = atomic::INIT_ATOMIC_UINT;
+pub const C2: atomic::AtomicUint = atomic::ATOMIC_UINT_INIT;
 pub const C3: fn() = foo;
 pub const C4: uint = C1 * C1 + C1 / C1;
 pub const C5: &'static uint = &C4;
 
 pub static S1: uint = 3;
-pub static S2: atomic::AtomicUint = atomic::INIT_ATOMIC_UINT;
+pub static S2: atomic::AtomicUint = atomic::ATOMIC_UINT_INIT;
 
 fn foo() {}
diff --git a/src/test/bench/shootout-binarytrees.rs b/src/test/bench/shootout-binarytrees.rs
index 0b16e8011e8..236e1cbb217 100644
--- a/src/test/bench/shootout-binarytrees.rs
+++ b/src/test/bench/shootout-binarytrees.rs
@@ -41,7 +41,7 @@
 extern crate arena;
 
 use std::iter::range_step;
-use std::sync::Future;
+use std::thread::Thread;
 use arena::TypedArena;
 
 enum Tree<'a> {
@@ -95,7 +95,7 @@ fn main() {
     let mut messages = range_step(min_depth, max_depth + 1, 2).map(|depth| {
             use std::num::Int;
             let iterations = 2i.pow((max_depth - depth + min_depth) as uint);
-            Future::spawn(move|| {
+            Thread::spawn(move|| {
                 let mut chk = 0;
                 for i in range(1, iterations + 1) {
                     let arena = TypedArena::new();
@@ -106,10 +106,10 @@ fn main() {
                 format!("{}\t trees of depth {}\t check: {}",
                         iterations * 2, depth, chk)
             })
-        }).collect::<Vec<Future<String>>>();
+        }).collect::<Vec<_>>();
 
-    for message in messages.iter_mut() {
-        println!("{}", *message.get_ref());
+    for message in messages.into_iter() {
+        println!("{}", message.join().ok().unwrap());
     }
 
     println!("long lived tree of depth {}\t check: {}",
diff --git a/src/test/bench/shootout-fannkuch-redux.rs b/src/test/bench/shootout-fannkuch-redux.rs
index ef38f5ef743..8e594b86180 100644
--- a/src/test/bench/shootout-fannkuch-redux.rs
+++ b/src/test/bench/shootout-fannkuch-redux.rs
@@ -41,7 +41,7 @@
 #![feature(slicing_syntax)]
 
 use std::{cmp, iter, mem};
-use std::sync::Future;
+use std::thread::Thread;
 
 fn rotate(x: &mut [i32]) {
     let mut prev = x[0];
@@ -168,15 +168,15 @@ fn fannkuch(n: i32) -> (i32, i32) {
     for (i, j) in range(0, N).zip(iter::count(0, k)) {
         let max = cmp::min(j+k, perm.max());
 
-        futures.push(Future::spawn(move|| {
+        futures.push(Thread::spawn(move|| {
             work(perm, j as uint, max as uint)
         }))
     }
 
     let mut checksum = 0;
     let mut maxflips = 0;
-    for fut in futures.iter_mut() {
-        let (cs, mf) = fut.get();
+    for fut in futures.into_iter() {
+        let (cs, mf) = fut.join().ok().unwrap();
         checksum += cs;
         maxflips = cmp::max(maxflips, mf);
     }
diff --git a/src/test/compile-fail/std-uncopyable-atomics.rs b/src/test/compile-fail/std-uncopyable-atomics.rs
index c0122b8a2a9..501187ca9e5 100644
--- a/src/test/compile-fail/std-uncopyable-atomics.rs
+++ b/src/test/compile-fail/std-uncopyable-atomics.rs
@@ -16,11 +16,11 @@ use std::sync::atomic::*;
 use std::ptr;
 
 fn main() {
-    let x = INIT_ATOMIC_BOOL;
+    let x = ATOMIC_BOOL_INIT;
     let x = *&x; //~ ERROR: cannot move out of dereference
-    let x = INIT_ATOMIC_INT;
+    let x = ATOMIC_INT_INIT;
     let x = *&x; //~ ERROR: cannot move out of dereference
-    let x = INIT_ATOMIC_UINT;
+    let x = ATOMIC_UINT_INIT;
     let x = *&x; //~ ERROR: cannot move out of dereference
     let x: AtomicPtr<uint> = AtomicPtr::new(ptr::null_mut());
     let x = *&x; //~ ERROR: cannot move out of dereference
diff --git a/src/test/run-pass/issue-17718.rs b/src/test/run-pass/issue-17718.rs
index 90a102222ba..10ad0f620e9 100644
--- a/src/test/run-pass/issue-17718.rs
+++ b/src/test/run-pass/issue-17718.rs
@@ -15,7 +15,7 @@ extern crate "issue-17718" as other;
 use std::sync::atomic;
 
 const C1: uint = 1;
-const C2: atomic::AtomicUint = atomic::INIT_ATOMIC_UINT;
+const C2: atomic::AtomicUint = atomic::ATOMIC_UINT_INIT;
 const C3: fn() = foo;
 const C4: uint = C1 * C1 + C1 / C1;
 const C5: &'static uint = &C4;
@@ -25,7 +25,7 @@ const C6: uint = {
 };
 
 static S1: uint = 3;
-static S2: atomic::AtomicUint = atomic::INIT_ATOMIC_UINT;
+static S2: atomic::AtomicUint = atomic::ATOMIC_UINT_INIT;
 
 mod test {
     static A: uint = 4;
diff --git a/src/test/run-pass/vector-sort-panic-safe.rs b/src/test/run-pass/vector-sort-panic-safe.rs
index 6ff1cffb4a4..c5f5cd2c3aa 100644
--- a/src/test/run-pass/vector-sort-panic-safe.rs
+++ b/src/test/run-pass/vector-sort-panic-safe.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use std::task;
-use std::sync::atomic::{AtomicUint, INIT_ATOMIC_UINT, Relaxed};
+use std::sync::atomic::{AtomicUint, ATOMIC_UINT_INIT, Relaxed};
 use std::rand::{thread_rng, Rng, Rand};
 
 const REPEATS: uint = 5;
@@ -17,18 +17,18 @@ const MAX_LEN: uint = 32;
 static drop_counts: [AtomicUint;  MAX_LEN] =
     // FIXME #5244: AtomicUint is not Copy.
     [
-        INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT,
-        INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT,
-        INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT,
-        INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT,
+        ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT,
+        ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT,
+        ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT,
+        ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT,
 
-        INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT,
-        INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT,
-        INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT,
-        INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT, INIT_ATOMIC_UINT,
+        ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT,
+        ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT,
+        ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT,
+        ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT, ATOMIC_UINT_INIT,
      ];
 
-static creation_count: AtomicUint = INIT_ATOMIC_UINT;
+static creation_count: AtomicUint = ATOMIC_UINT_INIT;
 
 #[deriving(Clone, PartialEq, PartialOrd, Eq, Ord)]
 struct DropCounter { x: uint, creation_id: uint }