diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-04-16 01:08:52 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-04-16 09:57:47 +1000 |
| commit | d3be98e9f5e721b53dccd0a43c2ff58ddd32ac47 (patch) | |
| tree | 2c1730e5ca7b3352854e92b51a7d0b44e5984438 /src/libstd/future.rs | |
| parent | f10cf26e25c75e148d86dd151a210d9f4a7ece2f (diff) | |
| download | rust-d3be98e9f5e721b53dccd0a43c2ff58ddd32ac47.tar.gz rust-d3be98e9f5e721b53dccd0a43c2ff58ddd32ac47.zip | |
libcore,std,syntax,rustc: move tests into `mod tests`, make them private (no pub mod or pub fn).
Diffstat (limited to 'src/libstd/future.rs')
| -rw-r--r-- | src/libstd/future.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/future.rs b/src/libstd/future.rs index feea8fb4fcd..a36f67fc95a 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -172,7 +172,7 @@ pub fn spawn<A:Owned>(blk: ~fn() -> A) -> Future<A> { #[allow(non_implicitly_copyable_typarams)] #[cfg(test)] -pub mod test { +mod test { use core::prelude::*; use future::*; @@ -181,13 +181,13 @@ pub mod test { use core::task; #[test] - pub fn test_from_value() { + fn test_from_value() { let f = from_value(~"snail"); assert!(f.get() == ~"snail"); } #[test] - pub fn test_from_port() { + fn test_from_port() { let (ch, po) = oneshot::init(); send_one(ch, ~"whale"); let f = from_port(po); @@ -195,25 +195,25 @@ pub mod test { } #[test] - pub fn test_from_fn() { + fn test_from_fn() { let f = from_fn(|| ~"brail"); assert!(f.get() == ~"brail"); } #[test] - pub fn test_interface_get() { + fn test_interface_get() { let f = from_value(~"fail"); assert!(f.get() == ~"fail"); } #[test] - pub fn test_get_ref_method() { + fn test_get_ref_method() { let f = from_value(22); assert!(*f.get_ref() == 22); } #[test] - pub fn test_spawn() { + fn test_spawn() { let f = spawn(|| ~"bale"); assert!(f.get() == ~"bale"); } @@ -221,13 +221,13 @@ pub mod test { #[test] #[should_fail] #[ignore(cfg(target_os = "win32"))] - pub fn test_futurefail() { + fn test_futurefail() { let f = spawn(|| fail!()); let _x: ~str = f.get(); } #[test] - pub fn test_sendable_future() { + fn test_sendable_future() { let expected = ~"schlorf"; let f = do spawn { copy expected }; do task::spawn || { |
