about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-04-25 09:55:06 +0000
committerbors <bors@rust-lang.org>2015-04-25 09:55:06 +0000
commite3d00a49803fa75580b912463666d86ce2ee3bb8 (patch)
treeb3f794635fbbf2ab87518d87922cda4612ae2aae /src/libstd/sync
parent54d65092a49eba959b5cd7a1c4b2e43b3fedba1f (diff)
parent07cc7d9960a1bc767dc051b9fae0c7ad2b5cd97f (diff)
downloadrust-e3d00a49803fa75580b912463666d86ce2ee3bb8.tar.gz
rust-e3d00a49803fa75580b912463666d86ce2ee3bb8.zip
Auto merge of #24783 - jooert:unittestguidelines, r=alexcrichton
Changes the style guidelines regarding unit tests to recommend using a sub-module named "tests" instead of "test" for unit tests as "test" might clash with imports of libtest (see #23870, #24030 and http://users.rust-lang.org/t/guidelines-naming-of-unit-test-module/1078 for previous discussions).

r? @alexcrichton 
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/future.rs2
-rw-r--r--src/libstd/sync/mpsc/mod.rs2
-rw-r--r--src/libstd/sync/mpsc/select.rs2
-rw-r--r--src/libstd/sync/mpsc/spsc_queue.rs2
-rw-r--r--src/libstd/sync/mutex.rs2
-rw-r--r--src/libstd/sync/once.rs2
6 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/sync/future.rs b/src/libstd/sync/future.rs
index 2cdde1aca9e..2d281eb4e24 100644
--- a/src/libstd/sync/future.rs
+++ b/src/libstd/sync/future.rs
@@ -155,7 +155,7 @@ impl<A:Send+'static> Future<A> {
 }
 
 #[cfg(test)]
-mod test {
+mod tests {
     use prelude::v1::*;
     use sync::mpsc::channel;
     use sync::Future;
diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs
index b3cc133d229..74e85db1a06 100644
--- a/src/libstd/sync/mpsc/mod.rs
+++ b/src/libstd/sync/mpsc/mod.rs
@@ -1065,7 +1065,7 @@ impl error::Error for TryRecvError {
 }
 
 #[cfg(test)]
-mod test {
+mod tests {
     use prelude::v1::*;
 
     use std::env;
diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs
index b8ad92841f2..58f16a83ba9 100644
--- a/src/libstd/sync/mpsc/select.rs
+++ b/src/libstd/sync/mpsc/select.rs
@@ -346,7 +346,7 @@ impl Iterator for Packets {
 
 #[cfg(test)]
 #[allow(unused_imports)]
-mod test {
+mod tests {
     use prelude::v1::*;
 
     use thread;
diff --git a/src/libstd/sync/mpsc/spsc_queue.rs b/src/libstd/sync/mpsc/spsc_queue.rs
index c75ac130808..4dd84364fa8 100644
--- a/src/libstd/sync/mpsc/spsc_queue.rs
+++ b/src/libstd/sync/mpsc/spsc_queue.rs
@@ -241,7 +241,7 @@ impl<T> Drop for Queue<T> {
 }
 
 #[cfg(test)]
-mod test {
+mod tests {
     use prelude::v1::*;
 
     use sync::Arc;
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs
index 5e688717c4a..caf011c54f2 100644
--- a/src/libstd/sync/mutex.rs
+++ b/src/libstd/sync/mutex.rs
@@ -361,7 +361,7 @@ pub fn guard_poison<'a, T>(guard: &MutexGuard<'a, T>) -> &'a poison::Flag {
 }
 
 #[cfg(test)]
-mod test {
+mod tests {
     use prelude::v1::*;
 
     use sync::mpsc::channel;
diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs
index 948965f5efa..2ce974c1271 100644
--- a/src/libstd/sync/once.rs
+++ b/src/libstd/sync/once.rs
@@ -121,7 +121,7 @@ impl Once {
 }
 
 #[cfg(test)]
-mod test {
+mod tests {
     use prelude::v1::*;
 
     use thread;