about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-04-16 01:08:52 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2013-04-16 09:57:47 +1000
commitd3be98e9f5e721b53dccd0a43c2ff58ddd32ac47 (patch)
tree2c1730e5ca7b3352854e92b51a7d0b44e5984438 /src/libstd
parentf10cf26e25c75e148d86dd151a210d9f4a7ece2f (diff)
downloadrust-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')
-rw-r--r--src/libstd/arc.rs24
-rw-r--r--src/libstd/base64.rs4
-rw-r--r--src/libstd/bitv.rs64
-rw-r--r--src/libstd/dlist.rs76
-rw-r--r--src/libstd/future.rs18
-rw-r--r--src/libstd/getopts.rs104
-rw-r--r--src/libstd/list.rs20
-rw-r--r--src/libstd/net_tcp.rs8
-rw-r--r--src/libstd/net_url.rs46
-rw-r--r--src/libstd/sha1.rs2
-rw-r--r--src/libstd/sort.rs18
-rw-r--r--src/libstd/sync.rs72
-rw-r--r--src/libstd/test.rs8
-rw-r--r--src/libstd/time.rs22
-rw-r--r--src/libstd/timer.rs10
-rw-r--r--src/libstd/uv_ll.rs12
16 files changed, 254 insertions, 254 deletions
diff --git a/src/libstd/arc.rs b/src/libstd/arc.rs
index 585ce2dc815..da1e4688939 100644
--- a/src/libstd/arc.rs
+++ b/src/libstd/arc.rs
@@ -492,7 +492,7 @@ mod tests {
     use core::vec;
 
     #[test]
-    pub fn manually_share_arc() {
+    fn manually_share_arc() {
         let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
         let arc_v = arc::ARC(v);
 
@@ -517,7 +517,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_mutex_arc_condvar() {
+    fn test_mutex_arc_condvar() {
         let arc = ~MutexARC(false);
         let arc2 = ~arc.clone();
         let (p,c) = comm::oneshot();
@@ -539,7 +539,7 @@ mod tests {
         }
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_arc_condvar_poison() {
+    fn test_arc_condvar_poison() {
         let arc = ~MutexARC(1);
         let arc2 = ~arc.clone();
         let (p, c) = comm::stream();
@@ -561,7 +561,7 @@ mod tests {
         }
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_mutex_arc_poison() {
+    fn test_mutex_arc_poison() {
         let arc = ~MutexARC(1);
         let arc2 = ~arc.clone();
         do task::try || {
@@ -574,7 +574,7 @@ mod tests {
         }
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_rw_arc_poison_wr() {
+    fn test_rw_arc_poison_wr() {
         let arc = ~RWARC(1);
         let arc2 = (*arc).clone();
         do task::try || {
@@ -587,7 +587,7 @@ mod tests {
         }
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_rw_arc_poison_ww() {
+    fn test_rw_arc_poison_ww() {
         let arc = ~RWARC(1);
         let arc2 = (*arc).clone();
         do task::try || {
@@ -600,7 +600,7 @@ mod tests {
         }
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_rw_arc_poison_dw() {
+    fn test_rw_arc_poison_dw() {
         let arc = ~RWARC(1);
         let arc2 = (*arc).clone();
         do task::try || {
@@ -615,7 +615,7 @@ mod tests {
         }
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_rw_arc_no_poison_rr() {
+    fn test_rw_arc_no_poison_rr() {
         let arc = ~RWARC(1);
         let arc2 = (*arc).clone();
         do task::try || {
@@ -628,7 +628,7 @@ mod tests {
         }
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_rw_arc_no_poison_rw() {
+    fn test_rw_arc_no_poison_rw() {
         let arc = ~RWARC(1);
         let arc2 = (*arc).clone();
         do task::try || {
@@ -641,7 +641,7 @@ mod tests {
         }
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_rw_arc_no_poison_dr() {
+    fn test_rw_arc_no_poison_dr() {
         let arc = ~RWARC(1);
         let arc2 = (*arc).clone();
         do task::try || {
@@ -657,7 +657,7 @@ mod tests {
         }
     }
     #[test]
-    pub fn test_rw_arc() {
+    fn test_rw_arc() {
         let arc = ~RWARC(0);
         let arc2 = (*arc).clone();
         let (p,c) = comm::stream();
@@ -694,7 +694,7 @@ mod tests {
         do arc.read |num| { assert!(*num == 10); }
     }
     #[test]
-    pub fn test_rw_downgrade() {
+    fn test_rw_downgrade() {
         // (1) A downgrader gets in write mode and does cond.wait.
         // (2) A writer gets in write mode, sets state to 42, and does signal.
         // (3) Downgrader wakes, sets state to 31337.
diff --git a/src/libstd/base64.rs b/src/libstd/base64.rs
index 781a720b1a4..c960c7186e3 100644
--- a/src/libstd/base64.rs
+++ b/src/libstd/base64.rs
@@ -154,7 +154,7 @@ mod tests {
     use core::str;
 
     #[test]
-    pub fn test_to_base64() {
+    fn test_to_base64() {
         assert!((~"").to_base64()       == ~"");
         assert!((~"f").to_base64()      == ~"Zg==");
         assert!((~"fo").to_base64()     == ~"Zm8=");
@@ -165,7 +165,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_from_base64() {
+    fn test_from_base64() {
         assert!((~"").from_base64() == str::to_bytes(~""));
         assert!((~"Zg==").from_base64() == str::to_bytes(~"f"));
         assert!((~"Zm8=").from_base64() == str::to_bytes(~"fo"));
diff --git a/src/libstd/bitv.rs b/src/libstd/bitv.rs
index 632a38e8ca2..d89ce4232b1 100644
--- a/src/libstd/bitv.rs
+++ b/src/libstd/bitv.rs
@@ -880,7 +880,7 @@ mod tests {
     static bench_bits : uint = 1 << 14;
 
     #[test]
-    pub fn test_to_str() {
+    fn test_to_str() {
         let zerolen = Bitv::new(0u, false);
         assert!(zerolen.to_str() == ~"");
 
@@ -889,7 +889,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_0_elements() {
+    fn test_0_elements() {
         let mut act;
         let mut exp;
         act = Bitv::new(0u, false);
@@ -898,7 +898,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_1_element() {
+    fn test_1_element() {
         let mut act;
         act = Bitv::new(1u, false);
         assert!(act.eq_vec(~[0u]));
@@ -907,7 +907,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_2_elements() {
+    fn test_2_elements() {
         let mut b = bitv::Bitv::new(2, false);
         b.set(0, true);
         b.set(1, false);
@@ -915,7 +915,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_10_elements() {
+    fn test_10_elements() {
         let mut act;
         // all 0
 
@@ -954,7 +954,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_31_elements() {
+    fn test_31_elements() {
         let mut act;
         // all 0
 
@@ -1027,7 +1027,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_32_elements() {
+    fn test_32_elements() {
         let mut act;
         // all 0
 
@@ -1102,7 +1102,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_33_elements() {
+    fn test_33_elements() {
         let mut act;
         // all 0
 
@@ -1178,21 +1178,21 @@ mod tests {
     }
 
     #[test]
-    pub fn test_equal_differing_sizes() {
+    fn test_equal_differing_sizes() {
         let v0 = Bitv::new(10u, false);
         let v1 = Bitv::new(11u, false);
         assert!(!v0.equal(&v1));
     }
 
     #[test]
-    pub fn test_equal_greatly_differing_sizes() {
+    fn test_equal_greatly_differing_sizes() {
         let v0 = Bitv::new(10u, false);
         let v1 = Bitv::new(110u, false);
         assert!(!v0.equal(&v1));
     }
 
     #[test]
-    pub fn test_equal_sneaky_small() {
+    fn test_equal_sneaky_small() {
         let mut a = bitv::Bitv::new(1, false);
         a.set(0, true);
 
@@ -1203,7 +1203,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_equal_sneaky_big() {
+    fn test_equal_sneaky_big() {
         let mut a = bitv::Bitv::new(100, false);
         for uint::range(0, 100) |i| {
             a.set(i, true);
@@ -1218,14 +1218,14 @@ mod tests {
     }
 
     #[test]
-    pub fn test_from_bytes() {
+    fn test_from_bytes() {
         let bitv = from_bytes([0b10110110, 0b00000000, 0b11111111]);
         let str = ~"10110110" + ~"00000000" + ~"11111111";
         assert!(bitv.to_str() == str);
     }
 
     #[test]
-    pub fn test_to_bytes() {
+    fn test_to_bytes() {
         let mut bv = Bitv::new(3, true);
         bv.set(1, false);
         assert!(bv.to_bytes() == ~[0b10100000]);
@@ -1237,19 +1237,19 @@ mod tests {
     }
 
     #[test]
-    pub fn test_from_bools() {
+    fn test_from_bools() {
         assert!(from_bools([true, false, true, true]).to_str() ==
             ~"1011");
     }
 
     #[test]
-    pub fn test_to_bools() {
+    fn test_to_bools() {
         let bools = ~[false, false, true, false, false, true, true, false];
         assert!(from_bytes([0b00100110]).to_bools() == bools);
     }
 
     #[test]
-    pub fn test_small_difference() {
+    fn test_small_difference() {
         let mut b1 = Bitv::new(3, false);
         let mut b2 = Bitv::new(3, false);
         b1.set(0, true);
@@ -1263,7 +1263,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_big_difference() {
+    fn test_big_difference() {
         let mut b1 = Bitv::new(100, false);
         let mut b2 = Bitv::new(100, false);
         b1.set(0, true);
@@ -1277,7 +1277,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_small_clear() {
+    fn test_small_clear() {
         let mut b = Bitv::new(14, true);
         b.clear();
         for b.ones |i| {
@@ -1286,7 +1286,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_big_clear() {
+    fn test_big_clear() {
         let mut b = Bitv::new(140, true);
         b.clear();
         for b.ones |i| {
@@ -1295,7 +1295,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_bitv_set_basic() {
+    fn test_bitv_set_basic() {
         let mut b = BitvSet::new();
         assert!(b.insert(3));
         assert!(!b.insert(3));
@@ -1382,7 +1382,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_bitv_set_union() {
+    fn test_bitv_set_union() {
         let mut a = BitvSet::new();
         let mut b = BitvSet::new();
         assert!(a.insert(1));
@@ -1410,7 +1410,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_bitv_remove() {
+    fn test_bitv_remove() {
         let mut a = BitvSet::new();
 
         assert!(a.insert(1));
@@ -1430,7 +1430,7 @@ mod tests {
     }
 
     #[bench]
-    pub fn bench_uint_small(b: &mut BenchHarness) {
+    fn bench_uint_small(b: &mut BenchHarness) {
         let r = rng();
         let mut bitv = 0 as uint;
         do b.iter {
@@ -1439,7 +1439,7 @@ mod tests {
     }
 
     #[bench]
-    pub fn bench_small_bitv_small(b: &mut BenchHarness) {
+    fn bench_small_bitv_small(b: &mut BenchHarness) {
         let r = rng();
         let mut bitv = SmallBitv::new(uint::bits);
         do b.iter {
@@ -1448,7 +1448,7 @@ mod tests {
     }
 
     #[bench]
-    pub fn bench_big_bitv_small(b: &mut BenchHarness) {
+    fn bench_big_bitv_small(b: &mut BenchHarness) {
         let r = rng();
         let mut bitv = BigBitv::new(~[0]);
         do b.iter {
@@ -1457,7 +1457,7 @@ mod tests {
     }
 
     #[bench]
-    pub fn bench_big_bitv_big(b: &mut BenchHarness) {
+    fn bench_big_bitv_big(b: &mut BenchHarness) {
         let r = rng();
         let mut storage = ~[];
         storage.grow(bench_bits / uint::bits, &0);
@@ -1468,7 +1468,7 @@ mod tests {
     }
 
     #[bench]
-    pub fn bench_bitv_big(b: &mut BenchHarness) {
+    fn bench_bitv_big(b: &mut BenchHarness) {
         let r = rng();
         let mut bitv = Bitv::new(bench_bits, false);
         do b.iter {
@@ -1477,7 +1477,7 @@ mod tests {
     }
 
     #[bench]
-    pub fn bench_bitv_small(b: &mut BenchHarness) {
+    fn bench_bitv_small(b: &mut BenchHarness) {
         let r = rng();
         let mut bitv = Bitv::new(uint::bits, false);
         do b.iter {
@@ -1486,7 +1486,7 @@ mod tests {
     }
 
     #[bench]
-    pub fn bench_bitv_set_small(b: &mut BenchHarness) {
+    fn bench_bitv_set_small(b: &mut BenchHarness) {
         let r = rng();
         let mut bitv = BitvSet::new();
         do b.iter {
@@ -1495,7 +1495,7 @@ mod tests {
     }
 
     #[bench]
-    pub fn bench_bitv_set_big(b: &mut BenchHarness) {
+    fn bench_bitv_set_big(b: &mut BenchHarness) {
         let r = rng();
         let mut bitv = BitvSet::new();
         do b.iter {
@@ -1504,7 +1504,7 @@ mod tests {
     }
 
     #[bench]
-    pub fn bench_bitv_big_union(b: &mut BenchHarness) {
+    fn bench_bitv_big_union(b: &mut BenchHarness) {
         let mut b1 = Bitv::new(bench_bits, false);
         let mut b2 = Bitv::new(bench_bits, false);
         do b.iter {
diff --git a/src/libstd/dlist.rs b/src/libstd/dlist.rs
index a490065b835..f9de2e0f58a 100644
--- a/src/libstd/dlist.rs
+++ b/src/libstd/dlist.rs
@@ -537,7 +537,7 @@ mod tests {
     use core::prelude::*;
 
     #[test]
-    pub fn test_dlist_concat() {
+    fn test_dlist_concat() {
         let a = from_vec(~[1,2]);
         let b = from_vec(~[3,4]);
         let c = from_vec(~[5,6]);
@@ -557,7 +557,7 @@ mod tests {
         abcd.assert_consistent(); assert!(abcd.is_empty());
     }
     #[test]
-    pub fn test_dlist_append() {
+    fn test_dlist_append() {
         let a = from_vec(~[1,2,3]);
         let b = from_vec(~[4,5,6]);
         a.append(b);
@@ -573,7 +573,7 @@ mod tests {
         a.assert_consistent(); assert!(a.is_empty());
     }
     #[test]
-    pub fn test_dlist_append_empty() {
+    fn test_dlist_append_empty() {
         let a = from_vec(~[1,2,3]);
         let b = DList::<int>();
         a.append(b);
@@ -586,7 +586,7 @@ mod tests {
         a.assert_consistent(); assert!(a.is_empty());
     }
     #[test]
-    pub fn test_dlist_append_to_empty() {
+    fn test_dlist_append_to_empty() {
         let a = DList::<int>();
         let b = from_vec(~[4,5,6]);
         a.append(b);
@@ -599,7 +599,7 @@ mod tests {
         a.assert_consistent(); assert!(a.is_empty());
     }
     #[test]
-    pub fn test_dlist_append_two_empty() {
+    fn test_dlist_append_two_empty() {
         let a = DList::<int>();
         let b = DList::<int>();
         a.append(b);
@@ -611,19 +611,19 @@ mod tests {
     #[test]
     #[ignore(cfg(windows))]
     #[should_fail]
-    pub fn test_dlist_append_self() {
+    fn test_dlist_append_self() {
         let a = DList::<int>();
         a.append(a);
     }
     #[test]
     #[ignore(cfg(windows))]
     #[should_fail]
-    pub fn test_dlist_prepend_self() {
+    fn test_dlist_prepend_self() {
         let a = DList::<int>();
         a.prepend(a);
     }
     #[test]
-    pub fn test_dlist_prepend() {
+    fn test_dlist_prepend() {
         let a = from_vec(~[1,2,3]);
         let b = from_vec(~[4,5,6]);
         b.prepend(a);
@@ -639,7 +639,7 @@ mod tests {
         b.assert_consistent(); assert!(b.is_empty());
     }
     #[test]
-    pub fn test_dlist_reverse() {
+    fn test_dlist_reverse() {
         let a = from_vec(~[5,4,3,2,1]);
         a.reverse();
         assert_eq!(a.len(), 5);
@@ -651,14 +651,14 @@ mod tests {
         a.assert_consistent(); assert!(a.is_empty());
     }
     #[test]
-    pub fn test_dlist_reverse_empty() {
+    fn test_dlist_reverse_empty() {
         let a = DList::<int>();
         a.reverse();
         assert_eq!(a.len(), 0);
         a.assert_consistent();
     }
     #[test]
-    pub fn test_dlist_each_node() {
+    fn test_dlist_each_node() {
         let a = from_vec(~[1,2,4,5]);
         for a.each_node |nobe| {
             if nobe.data > 3 {
@@ -675,28 +675,28 @@ mod tests {
         a.assert_consistent(); assert!(a.is_empty());
     }
     #[test]
-    pub fn test_dlist_clear() {
+    fn test_dlist_clear() {
         let a = from_vec(~[5,4,3,2,1]);
         a.clear();
         assert_eq!(a.len(), 0);
         a.assert_consistent();
     }
     #[test]
-    pub fn test_dlist_is_empty() {
+    fn test_dlist_is_empty() {
         let empty = DList::<int>();
         let full1 = from_vec(~[1,2,3]);
         assert!(empty.is_empty());
         assert!(!full1.is_empty());
     }
     #[test]
-    pub fn test_dlist_head_tail() {
+    fn test_dlist_head_tail() {
         let l = from_vec(~[1,2,3]);
         assert_eq!(l.head(), 1);
         assert_eq!(l.tail(), 3);
         assert_eq!(l.len(), 3);
     }
     #[test]
-    pub fn test_dlist_pop() {
+    fn test_dlist_pop() {
         let l = from_vec(~[1,2,3]);
         assert_eq!(l.pop().get(), 1);
         assert_eq!(l.tail(), 3);
@@ -709,7 +709,7 @@ mod tests {
         assert!(l.pop().is_none());
     }
     #[test]
-    pub fn test_dlist_pop_tail() {
+    fn test_dlist_pop_tail() {
         let l = from_vec(~[1,2,3]);
         assert_eq!(l.pop_tail().get(), 3);
         assert_eq!(l.tail(), 2);
@@ -722,7 +722,7 @@ mod tests {
         assert!(l.pop_tail().is_none());
     }
     #[test]
-    pub fn test_dlist_push() {
+    fn test_dlist_push() {
         let l = DList::<int>();
         l.push(1);
         assert_eq!(l.head(), 1);
@@ -736,7 +736,7 @@ mod tests {
         assert_eq!(l.len(), 3);
     }
     #[test]
-    pub fn test_dlist_push_head() {
+    fn test_dlist_push_head() {
         let l = DList::<int>();
         l.push_head(3);
         assert_eq!(l.head(), 3);
@@ -750,12 +750,12 @@ mod tests {
         assert_eq!(l.len(), 3);
     }
     #[test]
-    pub fn test_dlist_foldl() {
+    fn test_dlist_foldl() {
         let l = from_vec(vec::from_fn(101, |x|x));
         assert_eq!(iter::foldl(&l, 0, |accum,elem| *accum+*elem), 5050);
     }
     #[test]
-    pub fn test_dlist_break_early() {
+    fn test_dlist_break_early() {
         let l = from_vec(~[1,2,3,4,5]);
         let mut x = 0;
         for l.each |i| {
@@ -765,7 +765,7 @@ mod tests {
         assert_eq!(x, 3);
     }
     #[test]
-    pub fn test_dlist_remove_head() {
+    fn test_dlist_remove_head() {
         let l = DList::<int>();
         l.assert_consistent(); let one = l.push_n(1);
         l.assert_consistent(); let _two = l.push_n(2);
@@ -780,7 +780,7 @@ mod tests {
         l.assert_consistent(); assert!(l.is_empty());
     }
     #[test]
-    pub fn test_dlist_remove_mid() {
+    fn test_dlist_remove_mid() {
         let l = DList::<int>();
         l.assert_consistent(); let _one = l.push_n(1);
         l.assert_consistent(); let two = l.push_n(2);
@@ -795,7 +795,7 @@ mod tests {
         l.assert_consistent(); assert!(l.is_empty());
     }
     #[test]
-    pub fn test_dlist_remove_tail() {
+    fn test_dlist_remove_tail() {
         let l = DList::<int>();
         l.assert_consistent(); let _one = l.push_n(1);
         l.assert_consistent(); let _two = l.push_n(2);
@@ -810,7 +810,7 @@ mod tests {
         l.assert_consistent(); assert!(l.is_empty());
     }
     #[test]
-    pub fn test_dlist_remove_one_two() {
+    fn test_dlist_remove_one_two() {
         let l = DList::<int>();
         l.assert_consistent(); let one = l.push_n(1);
         l.assert_consistent(); let two = l.push_n(2);
@@ -826,7 +826,7 @@ mod tests {
         l.assert_consistent(); assert!(l.is_empty());
     }
     #[test]
-    pub fn test_dlist_remove_one_three() {
+    fn test_dlist_remove_one_three() {
         let l = DList::<int>();
         l.assert_consistent(); let one = l.push_n(1);
         l.assert_consistent(); let _two = l.push_n(2);
@@ -841,7 +841,7 @@ mod tests {
         l.assert_consistent(); assert!(l.is_empty());
     }
     #[test]
-    pub fn test_dlist_remove_two_three() {
+    fn test_dlist_remove_two_three() {
         let l = DList::<int>();
         l.assert_consistent(); let _one = l.push_n(1);
         l.assert_consistent(); let two = l.push_n(2);
@@ -856,7 +856,7 @@ mod tests {
         l.assert_consistent(); assert!(l.is_empty());
     }
     #[test]
-    pub fn test_dlist_remove_all() {
+    fn test_dlist_remove_all() {
         let l = DList::<int>();
         l.assert_consistent(); let one = l.push_n(1);
         l.assert_consistent(); let two = l.push_n(2);
@@ -869,7 +869,7 @@ mod tests {
         l.assert_consistent(); assert!(l.is_empty());
     }
     #[test]
-    pub fn test_dlist_insert_n_before() {
+    fn test_dlist_insert_n_before() {
         let l = DList::<int>();
         l.assert_consistent(); let _one = l.push_n(1);
         l.assert_consistent(); let two = l.push_n(2);
@@ -885,7 +885,7 @@ mod tests {
         l.assert_consistent(); assert!(l.is_empty());
     }
     #[test]
-    pub fn test_dlist_insert_n_after() {
+    fn test_dlist_insert_n_after() {
         let l = DList::<int>();
         l.assert_consistent(); let one = l.push_n(1);
         l.assert_consistent(); let _two = l.push_n(2);
@@ -901,7 +901,7 @@ mod tests {
         l.assert_consistent(); assert!(l.is_empty());
     }
     #[test]
-    pub fn test_dlist_insert_before_head() {
+    fn test_dlist_insert_before_head() {
         let l = DList::<int>();
         l.assert_consistent(); let one = l.push_n(1);
         l.assert_consistent(); let _two = l.push_n(2);
@@ -916,7 +916,7 @@ mod tests {
         l.assert_consistent(); assert!(l.is_empty());
     }
     #[test]
-    pub fn test_dlist_insert_after_tail() {
+    fn test_dlist_insert_after_tail() {
         let l = DList::<int>();
         l.assert_consistent(); let _one = l.push_n(1);
         l.assert_consistent(); let two = l.push_n(2);
@@ -931,7 +931,7 @@ mod tests {
         l.assert_consistent(); assert!(l.is_empty());
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_dlist_asymmetric_link() {
+    fn test_dlist_asymmetric_link() {
         let l = DList::<int>();
         let _one = l.push_n(1);
         let two = l.push_n(2);
@@ -939,7 +939,7 @@ mod tests {
         l.assert_consistent();
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_dlist_cyclic_list() {
+    fn test_dlist_cyclic_list() {
         let l = DList::<int>();
         let one = l.push_n(1);
         let _two = l.push_n(2);
@@ -949,32 +949,32 @@ mod tests {
         l.assert_consistent();
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_dlist_headless() {
+    fn test_dlist_headless() {
         DList::<int>().head();
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_dlist_insert_already_present_before() {
+    fn test_dlist_insert_already_present_before() {
         let l = DList::<int>();
         let one = l.push_n(1);
         let two = l.push_n(2);
         l.insert_n_before(two, one);
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_dlist_insert_already_present_after() {
+    fn test_dlist_insert_already_present_after() {
         let l = DList::<int>();
         let one = l.push_n(1);
         let two = l.push_n(2);
         l.insert_n_after(one, two);
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_dlist_insert_before_orphan() {
+    fn test_dlist_insert_before_orphan() {
         let l = DList::<int>();
         let one = new_dlist_node(1);
         let two = new_dlist_node(2);
         l.insert_n_before(one, two);
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_dlist_insert_after_orphan() {
+    fn test_dlist_insert_after_orphan() {
         let l = DList::<int>();
         let one = new_dlist_node(1);
         let two = new_dlist_node(2);
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 || {
diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs
index b1e80718d8f..d710a7b8735 100644
--- a/src/libstd/getopts.rs
+++ b/src/libstd/getopts.rs
@@ -662,7 +662,7 @@ mod tests {
     use core::result::{Err, Ok};
     use core::result;
 
-    pub fn check_fail_type(f: Fail_, ft: FailType) {
+    fn check_fail_type(f: Fail_, ft: FailType) {
         match f {
           ArgumentMissing(_) => assert!(ft == ArgumentMissing_),
           UnrecognizedOption(_) => assert!(ft == UnrecognizedOption_),
@@ -675,7 +675,7 @@ mod tests {
 
     // Tests for reqopt
     #[test]
-    pub fn test_reqopt_long() {
+    fn test_reqopt_long() {
         let args = ~[~"--test=20"];
         let opts = ~[reqopt(~"test")];
         let rs = getopts(args, opts);
@@ -689,7 +689,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_reqopt_long_missing() {
+    fn test_reqopt_long_missing() {
         let args = ~[~"blah"];
         let opts = ~[reqopt(~"test")];
         let rs = getopts(args, opts);
@@ -700,7 +700,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_reqopt_long_no_arg() {
+    fn test_reqopt_long_no_arg() {
         let args = ~[~"--test"];
         let opts = ~[reqopt(~"test")];
         let rs = getopts(args, opts);
@@ -711,7 +711,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_reqopt_long_multi() {
+    fn test_reqopt_long_multi() {
         let args = ~[~"--test=20", ~"--test=30"];
         let opts = ~[reqopt(~"test")];
         let rs = getopts(args, opts);
@@ -722,7 +722,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_reqopt_short() {
+    fn test_reqopt_short() {
         let args = ~[~"-t", ~"20"];
         let opts = ~[reqopt(~"t")];
         let rs = getopts(args, opts);
@@ -736,7 +736,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_reqopt_short_missing() {
+    fn test_reqopt_short_missing() {
         let args = ~[~"blah"];
         let opts = ~[reqopt(~"t")];
         let rs = getopts(args, opts);
@@ -747,7 +747,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_reqopt_short_no_arg() {
+    fn test_reqopt_short_no_arg() {
         let args = ~[~"-t"];
         let opts = ~[reqopt(~"t")];
         let rs = getopts(args, opts);
@@ -758,7 +758,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_reqopt_short_multi() {
+    fn test_reqopt_short_multi() {
         let args = ~[~"-t", ~"20", ~"-t", ~"30"];
         let opts = ~[reqopt(~"t")];
         let rs = getopts(args, opts);
@@ -771,7 +771,7 @@ mod tests {
 
     // Tests for optopt
     #[test]
-    pub fn test_optopt_long() {
+    fn test_optopt_long() {
         let args = ~[~"--test=20"];
         let opts = ~[optopt(~"test")];
         let rs = getopts(args, opts);
@@ -785,7 +785,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optopt_long_missing() {
+    fn test_optopt_long_missing() {
         let args = ~[~"blah"];
         let opts = ~[optopt(~"test")];
         let rs = getopts(args, opts);
@@ -796,7 +796,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optopt_long_no_arg() {
+    fn test_optopt_long_no_arg() {
         let args = ~[~"--test"];
         let opts = ~[optopt(~"test")];
         let rs = getopts(args, opts);
@@ -807,7 +807,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optopt_long_multi() {
+    fn test_optopt_long_multi() {
         let args = ~[~"--test=20", ~"--test=30"];
         let opts = ~[optopt(~"test")];
         let rs = getopts(args, opts);
@@ -818,7 +818,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optopt_short() {
+    fn test_optopt_short() {
         let args = ~[~"-t", ~"20"];
         let opts = ~[optopt(~"t")];
         let rs = getopts(args, opts);
@@ -832,7 +832,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optopt_short_missing() {
+    fn test_optopt_short_missing() {
         let args = ~[~"blah"];
         let opts = ~[optopt(~"t")];
         let rs = getopts(args, opts);
@@ -843,7 +843,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optopt_short_no_arg() {
+    fn test_optopt_short_no_arg() {
         let args = ~[~"-t"];
         let opts = ~[optopt(~"t")];
         let rs = getopts(args, opts);
@@ -854,7 +854,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optopt_short_multi() {
+    fn test_optopt_short_multi() {
         let args = ~[~"-t", ~"20", ~"-t", ~"30"];
         let opts = ~[optopt(~"t")];
         let rs = getopts(args, opts);
@@ -867,7 +867,7 @@ mod tests {
 
     // Tests for optflag
     #[test]
-    pub fn test_optflag_long() {
+    fn test_optflag_long() {
         let args = ~[~"--test"];
         let opts = ~[optflag(~"test")];
         let rs = getopts(args, opts);
@@ -878,7 +878,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optflag_long_missing() {
+    fn test_optflag_long_missing() {
         let args = ~[~"blah"];
         let opts = ~[optflag(~"test")];
         let rs = getopts(args, opts);
@@ -889,7 +889,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optflag_long_arg() {
+    fn test_optflag_long_arg() {
         let args = ~[~"--test=20"];
         let opts = ~[optflag(~"test")];
         let rs = getopts(args, opts);
@@ -903,7 +903,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optflag_long_multi() {
+    fn test_optflag_long_multi() {
         let args = ~[~"--test", ~"--test"];
         let opts = ~[optflag(~"test")];
         let rs = getopts(args, opts);
@@ -914,7 +914,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optflag_short() {
+    fn test_optflag_short() {
         let args = ~[~"-t"];
         let opts = ~[optflag(~"t")];
         let rs = getopts(args, opts);
@@ -925,7 +925,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optflag_short_missing() {
+    fn test_optflag_short_missing() {
         let args = ~[~"blah"];
         let opts = ~[optflag(~"t")];
         let rs = getopts(args, opts);
@@ -936,7 +936,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optflag_short_arg() {
+    fn test_optflag_short_arg() {
         let args = ~[~"-t", ~"20"];
         let opts = ~[optflag(~"t")];
         let rs = getopts(args, opts);
@@ -951,7 +951,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optflag_short_multi() {
+    fn test_optflag_short_multi() {
         let args = ~[~"-t", ~"-t"];
         let opts = ~[optflag(~"t")];
         let rs = getopts(args, opts);
@@ -963,7 +963,7 @@ mod tests {
 
     // Tests for optflagmulti
     #[test]
-    pub fn test_optflagmulti_short1() {
+    fn test_optflagmulti_short1() {
         let args = ~[~"-v"];
         let opts = ~[optflagmulti(~"v")];
         let rs = getopts(args, opts);
@@ -976,7 +976,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optflagmulti_short2a() {
+    fn test_optflagmulti_short2a() {
         let args = ~[~"-v", ~"-v"];
         let opts = ~[optflagmulti(~"v")];
         let rs = getopts(args, opts);
@@ -989,7 +989,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optflagmulti_short2b() {
+    fn test_optflagmulti_short2b() {
         let args = ~[~"-vv"];
         let opts = ~[optflagmulti(~"v")];
         let rs = getopts(args, opts);
@@ -1002,7 +1002,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optflagmulti_long1() {
+    fn test_optflagmulti_long1() {
         let args = ~[~"--verbose"];
         let opts = ~[optflagmulti(~"verbose")];
         let rs = getopts(args, opts);
@@ -1015,7 +1015,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optflagmulti_long2() {
+    fn test_optflagmulti_long2() {
         let args = ~[~"--verbose", ~"--verbose"];
         let opts = ~[optflagmulti(~"verbose")];
         let rs = getopts(args, opts);
@@ -1029,7 +1029,7 @@ mod tests {
 
     // Tests for optmulti
     #[test]
-    pub fn test_optmulti_long() {
+    fn test_optmulti_long() {
         let args = ~[~"--test=20"];
         let opts = ~[optmulti(~"test")];
         let rs = getopts(args, opts);
@@ -1043,7 +1043,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optmulti_long_missing() {
+    fn test_optmulti_long_missing() {
         let args = ~[~"blah"];
         let opts = ~[optmulti(~"test")];
         let rs = getopts(args, opts);
@@ -1054,7 +1054,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optmulti_long_no_arg() {
+    fn test_optmulti_long_no_arg() {
         let args = ~[~"--test"];
         let opts = ~[optmulti(~"test")];
         let rs = getopts(args, opts);
@@ -1065,7 +1065,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optmulti_long_multi() {
+    fn test_optmulti_long_multi() {
         let args = ~[~"--test=20", ~"--test=30"];
         let opts = ~[optmulti(~"test")];
         let rs = getopts(args, opts);
@@ -1082,7 +1082,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optmulti_short() {
+    fn test_optmulti_short() {
         let args = ~[~"-t", ~"20"];
         let opts = ~[optmulti(~"t")];
         let rs = getopts(args, opts);
@@ -1096,7 +1096,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optmulti_short_missing() {
+    fn test_optmulti_short_missing() {
         let args = ~[~"blah"];
         let opts = ~[optmulti(~"t")];
         let rs = getopts(args, opts);
@@ -1107,7 +1107,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optmulti_short_no_arg() {
+    fn test_optmulti_short_no_arg() {
         let args = ~[~"-t"];
         let opts = ~[optmulti(~"t")];
         let rs = getopts(args, opts);
@@ -1118,7 +1118,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_optmulti_short_multi() {
+    fn test_optmulti_short_multi() {
         let args = ~[~"-t", ~"20", ~"-t", ~"30"];
         let opts = ~[optmulti(~"t")];
         let rs = getopts(args, opts);
@@ -1135,7 +1135,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_unrecognized_option_long() {
+    fn test_unrecognized_option_long() {
         let args = ~[~"--untest"];
         let opts = ~[optmulti(~"t")];
         let rs = getopts(args, opts);
@@ -1146,7 +1146,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_unrecognized_option_short() {
+    fn test_unrecognized_option_short() {
         let args = ~[~"-t"];
         let opts = ~[optmulti(~"test")];
         let rs = getopts(args, opts);
@@ -1157,7 +1157,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_combined() {
+    fn test_combined() {
         let args =
             ~[~"prog", ~"free1", ~"-s", ~"20", ~"free2",
               ~"--flag", ~"--long=30", ~"-f", ~"-m", ~"40",
@@ -1189,7 +1189,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_multi() {
+    fn test_multi() {
         let args = ~[~"-e", ~"foo", ~"--encrypt", ~"foo"];
         let opts = ~[optopt(~"e"), optopt(~"encrypt"), optopt(~"f")];
         let matches = &match getopts(args, opts) {
@@ -1211,7 +1211,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_nospace() {
+    fn test_nospace() {
         let args = ~[~"-Lfoo", ~"-M."];
         let opts = ~[optmulti(~"L"), optmulti(~"M")];
         let matches = &match getopts(args, opts) {
@@ -1226,7 +1226,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_groups_reqopt() {
+    fn test_groups_reqopt() {
         let opt = groups::reqopt(~"b", ~"banana", ~"some bananas", ~"VAL");
         assert!(opt == OptGroup { short_name: ~"b",
                         long_name: ~"banana",
@@ -1237,7 +1237,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_groups_optopt() {
+    fn test_groups_optopt() {
         let opt = groups::optopt(~"a", ~"apple", ~"some apples", ~"VAL");
         assert!(opt == OptGroup { short_name: ~"a",
                         long_name: ~"apple",
@@ -1248,7 +1248,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_groups_optflag() {
+    fn test_groups_optflag() {
         let opt = groups::optflag(~"k", ~"kiwi", ~"some kiwis");
         assert!(opt == OptGroup { short_name: ~"k",
                         long_name: ~"kiwi",
@@ -1259,7 +1259,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_groups_optflagopt() {
+    fn test_groups_optflagopt() {
         let opt = groups::optflagopt(~"p", ~"pineapple",
                                        ~"some pineapples", ~"VAL");
         assert!(opt == OptGroup { short_name: ~"p",
@@ -1271,7 +1271,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_groups_optmulti() {
+    fn test_groups_optmulti() {
         let opt = groups::optmulti(~"l", ~"lime",
                                      ~"some limes", ~"VAL");
         assert!(opt == OptGroup { short_name: ~"l",
@@ -1283,7 +1283,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_groups_long_to_short() {
+    fn test_groups_long_to_short() {
         let short = ~[reqopt(~"b"), reqopt(~"banana")];
         let verbose = groups::reqopt(~"b", ~"banana",
                                        ~"some bananas", ~"VAL");
@@ -1292,7 +1292,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_groups_getopts() {
+    fn test_groups_getopts() {
         let short = ~[
             reqopt(~"b"), reqopt(~"banana"),
             optopt(~"a"), optopt(~"apple"),
@@ -1318,7 +1318,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_groups_usage() {
+    fn test_groups_usage() {
         let optgroups = ~[
             groups::reqopt(~"b", ~"banana", ~"Desc", ~"VAL"),
             groups::optopt(~"a", ~"012345678901234567890123456789",
@@ -1349,7 +1349,7 @@ Options:
     }
 
     #[test]
-    pub fn test_groups_usage_description_wrapping() {
+    fn test_groups_usage_description_wrapping() {
         // indentation should be 24 spaces
         // lines wrap after 78: or rather descriptions wrap after 54
 
diff --git a/src/libstd/list.rs b/src/libstd/list.rs
index 63d461ed4d3..8e173ff8a9c 100644
--- a/src/libstd/list.rs
+++ b/src/libstd/list.rs
@@ -160,7 +160,7 @@ mod tests {
     use core::option;
 
     #[test]
-    pub fn test_is_empty() {
+    fn test_is_empty() {
         let empty : @list::List<int> = from_vec(~[]);
         let full1 = from_vec(~[1]);
         let full2 = from_vec(~['r', 'u']);
@@ -171,7 +171,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_from_vec() {
+    fn test_from_vec() {
         let l = from_vec(~[0, 1, 2]);
 
         assert!((head(l) == 0));
@@ -184,13 +184,13 @@ mod tests {
     }
 
     #[test]
-    pub fn test_from_vec_empty() {
+    fn test_from_vec_empty() {
         let empty : @list::List<int> = from_vec(~[]);
         assert!((empty == @list::Nil::<int>));
     }
 
     #[test]
-    pub fn test_foldl() {
+    fn test_foldl() {
         fn add(a: &uint, b: &int) -> uint { return *a + (*b as uint); }
         let l = from_vec(~[0, 1, 2, 3, 4]);
         let empty = @list::Nil::<int>;
@@ -199,7 +199,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_foldl2() {
+    fn test_foldl2() {
         fn sub(a: &int, b: &int) -> int {
             *a - *b
         }
@@ -208,14 +208,14 @@ mod tests {
     }
 
     #[test]
-    pub fn test_find_success() {
+    fn test_find_success() {
         fn match_(i: &int) -> bool { return *i == 2; }
         let l = from_vec(~[0, 1, 2]);
         assert!((list::find(l, match_) == option::Some(2)));
     }
 
     #[test]
-    pub fn test_find_fail() {
+    fn test_find_fail() {
         fn match_(_i: &int) -> bool { return false; }
         let l = from_vec(~[0, 1, 2]);
         let empty = @list::Nil::<int>;
@@ -224,7 +224,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_has() {
+    fn test_has() {
         let l = from_vec(~[5, 8, 6]);
         let empty = @list::Nil::<int>;
         assert!((list::has(l, 5)));
@@ -234,7 +234,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_len() {
+    fn test_len() {
         let l = from_vec(~[0, 1, 2]);
         let empty = @list::Nil::<int>;
         assert!((list::len(l) == 3u));
@@ -242,7 +242,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_append() {
+    fn test_append() {
         assert!(from_vec(~[1,2,3,4])
             == list::append(list::from_vec(~[1,2]), list::from_vec(~[3,4])));
     }
diff --git a/src/libstd/net_tcp.rs b/src/libstd/net_tcp.rs
index a8b2723bcfb..b32df75063d 100644
--- a/src/libstd/net_tcp.rs
+++ b/src/libstd/net_tcp.rs
@@ -1426,7 +1426,7 @@ struct TcpBufferedSocketData {
 }
 
 #[cfg(test)]
-pub mod test {
+mod test {
     use net::ip;
     use net::tcp::{GenericListenErr, TcpConnectErrData, TcpListenErrData};
     use net::tcp::{connect, accept, read, listen, TcpSocket, socket_buf};
@@ -1447,9 +1447,9 @@ pub mod test {
     #[cfg(target_os="darwin")]
     #[cfg(target_os="linux")]
     #[cfg(target_os="android")]
-    pub mod tcp_ipv4_server_and_client_test {
+    mod tcp_ipv4_server_and_client_test {
         #[cfg(target_arch="x86_64")]
-        pub mod impl64 {
+        mod impl64 {
             use net::tcp::test::*;
 
             #[test]
@@ -1497,7 +1497,7 @@ pub mod test {
         #[cfg(target_arch="x86")]
         #[cfg(target_arch="arm")]
         #[cfg(target_arch="mips")]
-        pub mod impl32 {
+        mod impl32 {
             use net::tcp::test::*;
 
             #[test]
diff --git a/src/libstd/net_url.rs b/src/libstd/net_url.rs
index 9b8b0f9be0b..4cb9a98036b 100644
--- a/src/libstd/net_url.rs
+++ b/src/libstd/net_url.rs
@@ -810,7 +810,7 @@ mod tests {
     use core::hashmap::HashMap;
 
     #[test]
-    pub fn test_url_parse() {
+    fn test_url_parse() {
         let url = ~"http://user:pass@rust-lang.org/doc?s=v#something";
 
         let up = from_str(url);
@@ -826,7 +826,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_url_parse_host_slash() {
+    fn test_url_parse_host_slash() {
         let urlstr = ~"http://0.42.42.42/";
         let url = from_str(urlstr).unwrap();
         assert!(url.host == ~"0.42.42.42");
@@ -834,87 +834,87 @@ mod tests {
     }
 
     #[test]
-    pub fn test_url_with_underscores() {
+    fn test_url_with_underscores() {
         let urlstr = ~"http://dotcom.com/file_name.html";
         let url = from_str(urlstr).unwrap();
         assert!(url.path == ~"/file_name.html");
     }
 
     #[test]
-    pub fn test_url_with_dashes() {
+    fn test_url_with_dashes() {
         let urlstr = ~"http://dotcom.com/file-name.html";
         let url = from_str(urlstr).unwrap();
         assert!(url.path == ~"/file-name.html");
     }
 
     #[test]
-    pub fn test_no_scheme() {
+    fn test_no_scheme() {
         assert!(get_scheme("noschemehere.html").is_err());
     }
 
     #[test]
-    pub fn test_invalid_scheme_errors() {
+    fn test_invalid_scheme_errors() {
         assert!(from_str("99://something").is_err());
         assert!(from_str("://something").is_err());
     }
 
     #[test]
-    pub fn test_full_url_parse_and_format() {
+    fn test_full_url_parse_and_format() {
         let url = ~"http://user:pass@rust-lang.org/doc?s=v#something";
         assert!(from_str(url).unwrap().to_str() == url);
     }
 
     #[test]
-    pub fn test_userless_url_parse_and_format() {
+    fn test_userless_url_parse_and_format() {
         let url = ~"http://rust-lang.org/doc?s=v#something";
         assert!(from_str(url).unwrap().to_str() == url);
     }
 
     #[test]
-    pub fn test_queryless_url_parse_and_format() {
+    fn test_queryless_url_parse_and_format() {
         let url = ~"http://user:pass@rust-lang.org/doc#something";
         assert!(from_str(url).unwrap().to_str() == url);
     }
 
     #[test]
-    pub fn test_empty_query_url_parse_and_format() {
+    fn test_empty_query_url_parse_and_format() {
         let url = ~"http://user:pass@rust-lang.org/doc?#something";
         let should_be = ~"http://user:pass@rust-lang.org/doc#something";
         assert!(from_str(url).unwrap().to_str() == should_be);
     }
 
     #[test]
-    pub fn test_fragmentless_url_parse_and_format() {
+    fn test_fragmentless_url_parse_and_format() {
         let url = ~"http://user:pass@rust-lang.org/doc?q=v";
         assert!(from_str(url).unwrap().to_str() == url);
     }
 
     #[test]
-    pub fn test_minimal_url_parse_and_format() {
+    fn test_minimal_url_parse_and_format() {
         let url = ~"http://rust-lang.org/doc";
         assert!(from_str(url).unwrap().to_str() == url);
     }
 
     #[test]
-    pub fn test_scheme_host_only_url_parse_and_format() {
+    fn test_scheme_host_only_url_parse_and_format() {
         let url = ~"http://rust-lang.org";
         assert!(from_str(url).unwrap().to_str() == url);
     }
 
     #[test]
-    pub fn test_pathless_url_parse_and_format() {
+    fn test_pathless_url_parse_and_format() {
         let url = ~"http://user:pass@rust-lang.org?q=v#something";
         assert!(from_str(url).unwrap().to_str() == url);
     }
 
     #[test]
-    pub fn test_scheme_host_fragment_only_url_parse_and_format() {
+    fn test_scheme_host_fragment_only_url_parse_and_format() {
         let url = ~"http://rust-lang.org#something";
         assert!(from_str(url).unwrap().to_str() == url);
     }
 
     #[test]
-    pub fn test_url_component_encoding() {
+    fn test_url_component_encoding() {
         let url = ~"http://rust-lang.org/doc%20uments?ba%25d%20=%23%26%2B";
         let u = from_str(url).unwrap();
         assert!(u.path == ~"/doc uments");
@@ -922,13 +922,13 @@ mod tests {
     }
 
     #[test]
-    pub fn test_url_without_authority() {
+    fn test_url_without_authority() {
         let url = ~"mailto:test@email.com";
         assert!(from_str(url).unwrap().to_str() == url);
     }
 
     #[test]
-    pub fn test_encode() {
+    fn test_encode() {
         assert!(encode("") == ~"");
         assert!(encode("http://example.com") == ~"http://example.com");
         assert!(encode("foo bar% baz") == ~"foo%20bar%25%20baz");
@@ -956,7 +956,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_encode_component() {
+    fn test_encode_component() {
         assert!(encode_component("") == ~"");
         assert!(encode_component("http://example.com") ==
             ~"http%3A%2F%2Fexample.com");
@@ -985,7 +985,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_decode() {
+    fn test_decode() {
         assert!(decode("") == ~"");
         assert!(decode("abc/def 123") == ~"abc/def 123");
         assert!(decode("abc%2Fdef%20123") == ~"abc%2Fdef 123");
@@ -1013,7 +1013,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_decode_component() {
+    fn test_decode_component() {
         assert!(decode_component("") == ~"");
         assert!(decode_component("abc/def 123") == ~"abc/def 123");
         assert!(decode_component("abc%2Fdef%20123") == ~"abc/def 123");
@@ -1041,7 +1041,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_encode_form_urlencoded() {
+    fn test_encode_form_urlencoded() {
         let mut m = HashMap::new();
         assert!(encode_form_urlencoded(&m) == ~"");
 
@@ -1060,7 +1060,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_decode_form_urlencoded() {
+    fn test_decode_form_urlencoded() {
         // FIXME #4449: Commented out because this causes an ICE, but only
         // on FreeBSD
         /*
diff --git a/src/libstd/sha1.rs b/src/libstd/sha1.rs
index f5f7f5e326a..6aa4d1c54bc 100644
--- a/src/libstd/sha1.rs
+++ b/src/libstd/sha1.rs
@@ -282,7 +282,7 @@ mod tests {
     use core::vec;
 
     #[test]
-    pub fn test() {
+    fn test() {
         struct Test {
             input: ~str,
             output: ~[u8],
diff --git a/src/libstd/sort.rs b/src/libstd/sort.rs
index 39ca9bb5ba6..72a888fcc91 100644
--- a/src/libstd/sort.rs
+++ b/src/libstd/sort.rs
@@ -733,7 +733,7 @@ mod test_qsort3 {
 
     use core::vec;
 
-    pub fn check_sort(v1: &mut [int], v2: &mut [int]) {
+    fn check_sort(v1: &mut [int], v2: &mut [int]) {
         let len = vec::len::<int>(v1);
         quick_sort3::<int>(v1);
         let mut i = 0;
@@ -745,7 +745,7 @@ mod test_qsort3 {
     }
 
     #[test]
-    pub fn test() {
+    fn test() {
         {
             let mut v1 = ~[3, 7, 4, 5, 2, 9, 5, 8];
             let mut v2 = ~[2, 3, 4, 5, 5, 7, 8, 9];
@@ -777,7 +777,7 @@ mod test_qsort {
     use core::int;
     use core::vec;
 
-    pub fn check_sort(v1: &mut [int], v2: &mut [int]) {
+    fn check_sort(v1: &mut [int], v2: &mut [int]) {
         let len = vec::len::<int>(v1);
         fn leual(a: &int, b: &int) -> bool { *a <= *b }
         quick_sort::<int>(v1, leual);
@@ -790,7 +790,7 @@ mod test_qsort {
     }
 
     #[test]
-    pub fn test() {
+    fn test() {
         {
             let mut v1 = ~[3, 7, 4, 5, 2, 9, 5, 8];
             let mut v2 = ~[2, 3, 4, 5, 5, 7, 8, 9];
@@ -816,7 +816,7 @@ mod test_qsort {
 
     // Regression test for #750
     #[test]
-    pub fn test_simple() {
+    fn test_simple() {
         let mut names = ~[2, 1, 3];
 
         let expected = ~[1, 2, 3];
@@ -842,7 +842,7 @@ mod tests {
 
     use core::vec;
 
-    pub fn check_sort(v1: &[int], v2: &[int]) {
+    fn check_sort(v1: &[int], v2: &[int]) {
         let len = vec::len::<int>(v1);
         pub fn le(a: &int, b: &int) -> bool { *a <= *b }
         let f = le;
@@ -856,7 +856,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test() {
+    fn test() {
         {
             let v1 = ~[3, 7, 4, 5, 2, 9, 5, 8];
             let v2 = ~[2, 3, 4, 5, 5, 7, 8, 9];
@@ -873,7 +873,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_merge_sort_mutable() {
+    fn test_merge_sort_mutable() {
         pub fn le(a: &int, b: &int) -> bool { *a <= *b }
         let mut v1 = ~[3, 2, 1];
         let v2 = merge_sort(v1, le);
@@ -881,7 +881,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_merge_sort_stability() {
+    fn test_merge_sort_stability() {
         // tjc: funny that we have to use parens
         fn ile(x: &(&'static str), y: &(&'static str)) -> bool
         {
diff --git a/src/libstd/sync.rs b/src/libstd/sync.rs
index f2de8213a1b..971bb51f7e9 100644
--- a/src/libstd/sync.rs
+++ b/src/libstd/sync.rs
@@ -728,19 +728,19 @@ mod tests {
      * Semaphore tests
      ************************************************************************/
     #[test]
-    pub fn test_sem_acquire_release() {
+    fn test_sem_acquire_release() {
         let s = ~semaphore(1);
         s.acquire();
         s.release();
         s.acquire();
     }
     #[test]
-    pub fn test_sem_basic() {
+    fn test_sem_basic() {
         let s = ~semaphore(1);
         do s.access { }
     }
     #[test]
-    pub fn test_sem_as_mutex() {
+    fn test_sem_as_mutex() {
         let s = ~semaphore(1);
         let s2 = ~s.clone();
         do task::spawn || {
@@ -753,7 +753,7 @@ mod tests {
         }
     }
     #[test]
-    pub fn test_sem_as_cvar() {
+    fn test_sem_as_cvar() {
         /* Child waits and parent signals */
         let (p,c) = comm::stream();
         let s = ~semaphore(0);
@@ -779,7 +779,7 @@ mod tests {
         c.send(());
     }
     #[test]
-    pub fn test_sem_multi_resource() {
+    fn test_sem_multi_resource() {
         // Parent and child both get in the critical section at the same
         // time, and shake hands.
         let s = ~semaphore(2);
@@ -798,7 +798,7 @@ mod tests {
         }
     }
     #[test]
-    pub fn test_sem_runtime_friendly_blocking() {
+    fn test_sem_runtime_friendly_blocking() {
         // Force the runtime to schedule two threads on the same sched_loop.
         // When one blocks, it should schedule the other one.
         do task::spawn_sched(task::ManualThreads(1)) {
@@ -823,7 +823,7 @@ mod tests {
      * Mutex tests
      ************************************************************************/
     #[test]
-    pub fn test_mutex_lock() {
+    fn test_mutex_lock() {
         // Unsafely achieve shared state, and do the textbook
         // "load tmp = move ptr; inc tmp; store ptr <- tmp" dance.
         let (p,c) = comm::stream();
@@ -854,7 +854,7 @@ mod tests {
         }
     }
     #[test]
-    pub fn test_mutex_cond_wait() {
+    fn test_mutex_cond_wait() {
         let m = ~Mutex();
 
         // Child wakes up parent
@@ -886,7 +886,7 @@ mod tests {
         let _ = port.recv(); // Wait until child wakes up
     }
     #[cfg(test)]
-    pub fn test_mutex_cond_broadcast_helper(num_waiters: uint) {
+    fn test_mutex_cond_broadcast_helper(num_waiters: uint) {
         let m = ~Mutex();
         let mut ports = ~[];
 
@@ -913,15 +913,15 @@ mod tests {
         for ports.each |port| { let _ = port.recv(); }
     }
     #[test]
-    pub fn test_mutex_cond_broadcast() {
+    fn test_mutex_cond_broadcast() {
         test_mutex_cond_broadcast_helper(12);
     }
     #[test]
-    pub fn test_mutex_cond_broadcast_none() {
+    fn test_mutex_cond_broadcast_none() {
         test_mutex_cond_broadcast_helper(0);
     }
     #[test]
-    pub fn test_mutex_cond_no_waiter() {
+    fn test_mutex_cond_no_waiter() {
         let m = ~Mutex();
         let m2 = ~m.clone();
         do task::try || {
@@ -932,7 +932,7 @@ mod tests {
         }
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_mutex_killed_simple() {
+    fn test_mutex_killed_simple() {
         // Mutex must get automatically unlocked if failed/killed within.
         let m = ~Mutex();
         let m2 = ~m.clone();
@@ -947,7 +947,7 @@ mod tests {
         do m.lock { }
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_mutex_killed_cond() {
+    fn test_mutex_killed_cond() {
         // Getting killed during cond wait must not corrupt the mutex while
         // unwinding (e.g. double unlock).
         let m = ~Mutex();
@@ -973,7 +973,7 @@ mod tests {
         }
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_mutex_killed_broadcast() {
+    fn test_mutex_killed_broadcast() {
         let m = ~Mutex();
         let m2 = ~m.clone();
         let (p,c) = comm::stream();
@@ -1026,7 +1026,7 @@ mod tests {
         }
     }
     #[test]
-    pub fn test_mutex_cond_signal_on_0() {
+    fn test_mutex_cond_signal_on_0() {
         // Tests that signal_on(0) is equivalent to signal().
         let m = ~Mutex();
         do m.lock_cond |cond| {
@@ -1040,7 +1040,7 @@ mod tests {
         }
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_mutex_different_conds() {
+    fn test_mutex_different_conds() {
         let result = do task::try {
             let m = ~mutex_with_condvars(2);
             let m2 = ~m.clone();
@@ -1061,7 +1061,7 @@ mod tests {
         assert!(result.is_err());
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_mutex_no_condvars() {
+    fn test_mutex_no_condvars() {
         let result = do task::try {
             let m = ~mutex_with_condvars(0);
             do m.lock_cond |cond| { cond.wait(); }
@@ -1084,7 +1084,7 @@ mod tests {
     #[cfg(test)]
     pub enum RWlockMode { Read, Write, Downgrade, DowngradeRead }
     #[cfg(test)]
-    pub fn lock_rwlock_in_mode(x: &RWlock, mode: RWlockMode, blk: &fn()) {
+    fn lock_rwlock_in_mode(x: &RWlock, mode: RWlockMode, blk: &fn()) {
         match mode {
             Read => x.read(blk),
             Write => x.write(blk),
@@ -1100,7 +1100,7 @@ mod tests {
         }
     }
     #[cfg(test)]
-    pub fn test_rwlock_exclusion(x: ~RWlock,
+    fn test_rwlock_exclusion(x: ~RWlock,
                                  mode1: RWlockMode,
                                  mode2: RWlockMode) {
         // Test mutual exclusion between readers and writers. Just like the
@@ -1132,21 +1132,21 @@ mod tests {
         }
     }
     #[test]
-    pub fn test_rwlock_readers_wont_modify_the_data() {
+    fn test_rwlock_readers_wont_modify_the_data() {
         test_rwlock_exclusion(~RWlock(), Read, Write);
         test_rwlock_exclusion(~RWlock(), Write, Read);
         test_rwlock_exclusion(~RWlock(), Read, Downgrade);
         test_rwlock_exclusion(~RWlock(), Downgrade, Read);
     }
     #[test]
-    pub fn test_rwlock_writers_and_writers() {
+    fn test_rwlock_writers_and_writers() {
         test_rwlock_exclusion(~RWlock(), Write, Write);
         test_rwlock_exclusion(~RWlock(), Write, Downgrade);
         test_rwlock_exclusion(~RWlock(), Downgrade, Write);
         test_rwlock_exclusion(~RWlock(), Downgrade, Downgrade);
     }
     #[cfg(test)]
-    pub fn test_rwlock_handshake(x: ~RWlock,
+    fn test_rwlock_handshake(x: ~RWlock,
                                  mode1: RWlockMode,
                                  mode2: RWlockMode,
                                  make_mode2_go_first: bool) {
@@ -1178,7 +1178,7 @@ mod tests {
         }
     }
     #[test]
-    pub fn test_rwlock_readers_and_readers() {
+    fn test_rwlock_readers_and_readers() {
         test_rwlock_handshake(~RWlock(), Read, Read, false);
         // The downgrader needs to get in before the reader gets in, otherwise
         // they cannot end up reading at the same time.
@@ -1187,7 +1187,7 @@ mod tests {
         // Two downgrade_reads can never both end up reading at the same time.
     }
     #[test]
-    pub fn test_rwlock_downgrade_unlock() {
+    fn test_rwlock_downgrade_unlock() {
         // Tests that downgrade can unlock the lock in both modes
         let x = ~RWlock();
         do lock_rwlock_in_mode(x, Downgrade) { }
@@ -1197,12 +1197,12 @@ mod tests {
         test_rwlock_exclusion(y, Write, Write);
     }
     #[test]
-    pub fn test_rwlock_read_recursive() {
+    fn test_rwlock_read_recursive() {
         let x = ~RWlock();
         do x.read { do x.read { } }
     }
     #[test]
-    pub fn test_rwlock_cond_wait() {
+    fn test_rwlock_cond_wait() {
         // As test_mutex_cond_wait above.
         let x = ~RWlock();
 
@@ -1237,7 +1237,7 @@ mod tests {
         do x.read { } // Just for good measure
     }
     #[cfg(test)]
-    pub fn test_rwlock_cond_broadcast_helper(num_waiters: uint,
+    fn test_rwlock_cond_broadcast_helper(num_waiters: uint,
                                              dg1: bool,
                                              dg2: bool) {
         // Much like the mutex broadcast test. Downgrade-enabled.
@@ -1276,7 +1276,7 @@ mod tests {
         for ports.each |port| { let _ = port.recv(); }
     }
     #[test]
-    pub fn test_rwlock_cond_broadcast() {
+    fn test_rwlock_cond_broadcast() {
         test_rwlock_cond_broadcast_helper(0, true, true);
         test_rwlock_cond_broadcast_helper(0, true, false);
         test_rwlock_cond_broadcast_helper(0, false, true);
@@ -1287,7 +1287,7 @@ mod tests {
         test_rwlock_cond_broadcast_helper(12, false, false);
     }
     #[cfg(test)] #[ignore(cfg(windows))]
-    pub fn rwlock_kill_helper(mode1: RWlockMode, mode2: RWlockMode) {
+    fn rwlock_kill_helper(mode1: RWlockMode, mode2: RWlockMode) {
         // Mutex must get automatically unlocked if failed/killed within.
         let x = ~RWlock();
         let x2 = (*x).clone();
@@ -1302,23 +1302,23 @@ mod tests {
         do lock_rwlock_in_mode(x, mode2) { }
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_rwlock_reader_killed_writer() {
+    fn test_rwlock_reader_killed_writer() {
         rwlock_kill_helper(Read, Write);
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_rwlock_writer_killed_reader() {
+    fn test_rwlock_writer_killed_reader() {
         rwlock_kill_helper(Write,Read );
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_rwlock_reader_killed_reader() {
+    fn test_rwlock_reader_killed_reader() {
         rwlock_kill_helper(Read, Read );
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_rwlock_writer_killed_writer() {
+    fn test_rwlock_writer_killed_writer() {
         rwlock_kill_helper(Write,Write);
     }
     #[test] #[ignore(cfg(windows))]
-    pub fn test_rwlock_kill_downgrader() {
+    fn test_rwlock_kill_downgrader() {
         rwlock_kill_helper(Downgrade, Read);
         rwlock_kill_helper(Read, Downgrade);
         rwlock_kill_helper(Downgrade, Write);
@@ -1333,7 +1333,7 @@ mod tests {
         rwlock_kill_helper(Downgrade, DowngradeRead);
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
-    pub fn test_rwlock_downgrade_cant_swap() {
+    fn test_rwlock_downgrade_cant_swap() {
         // Tests that you can't downgrade with a different rwlock's token.
         let x = ~RWlock();
         let y = ~RWlock();
diff --git a/src/libstd/test.rs b/src/libstd/test.rs
index 04fa319b255..ee83a0c9bd6 100644
--- a/src/libstd/test.rs
+++ b/src/libstd/test.rs
@@ -823,7 +823,7 @@ mod tests {
 
     #[test]
     #[ignore(cfg(windows))]
-    pub fn test_should_fail() {
+    fn test_should_fail() {
         fn f() { fail!(); }
         let desc = TestDescAndFn {
             desc: TestDesc {
@@ -841,7 +841,7 @@ mod tests {
     }
 
     #[test]
-    pub fn test_should_fail_but_succeeds() {
+    fn test_should_fail_but_succeeds() {
         fn f() { }
         let desc = TestDescAndFn {
             desc: TestDesc {
@@ -859,7 +859,7 @@ mod tests {
     }
 
     #[test]
-    pub fn first_free_arg_should_be_a_filter() {
+    fn first_free_arg_should_be_a_filter() {
         let args = ~[~"progname", ~"filter"];
         let opts = match parse_opts(args) {
           either::Left(copy o) => o,
@@ -869,7 +869,7 @@ mod tests {
     }
 
     #[test]
-    pub fn parse_ignored_flag() {
+    fn parse_ignored_flag() {
         let args = ~[~"progname", ~"filter", ~"--ignored"];
         let opts = match parse_opts(args) {
           either::Left(copy o) => o,
diff --git a/src/libstd/time.rs b/src/libstd/time.rs
index adfa12594aa..70dc4d8cfeb 100644
--- a/src/libstd/time.rs
+++ b/src/libstd/time.rs
@@ -872,7 +872,7 @@ mod tests {
     use core::str;
     use core::vec;
 
-    pub fn test_get_time() {
+    fn test_get_time() {
         static some_recent_date: i64 = 1325376000i64; // 2012-01-01T00:00:00Z
         static some_future_date: i64 = 1577836800i64; // 2020-01-01T00:00:00Z
 
@@ -893,7 +893,7 @@ mod tests {
         }
     }
 
-    pub fn test_precise_time() {
+    fn test_precise_time() {
         let s0 = precise_time_s();
         let ns1 = precise_time_ns();
 
@@ -910,7 +910,7 @@ mod tests {
         assert!(ns2 >= ns1);
     }
 
-    pub fn test_at_utc() {
+    fn test_at_utc() {
         os::setenv(~"TZ", ~"America/Los_Angeles");
         tzset();
 
@@ -931,7 +931,7 @@ mod tests {
         assert!(utc.tm_nsec == 54321_i32);
     }
 
-    pub fn test_at() {
+    fn test_at() {
         os::setenv(~"TZ", ~"America/Los_Angeles");
         tzset();
 
@@ -959,7 +959,7 @@ mod tests {
         assert!(local.tm_nsec == 54321_i32);
     }
 
-    pub fn test_to_timespec() {
+    fn test_to_timespec() {
         os::setenv(~"TZ", ~"America/Los_Angeles");
         tzset();
 
@@ -970,7 +970,7 @@ mod tests {
         assert!(utc.to_local().to_timespec() == time);
     }
 
-    pub fn test_conversions() {
+    fn test_conversions() {
         os::setenv(~"TZ", ~"America/Los_Angeles");
         tzset();
 
@@ -986,7 +986,7 @@ mod tests {
         assert!(utc.to_local().to_utc() == utc);
     }
 
-    pub fn test_strptime() {
+    fn test_strptime() {
         os::setenv(~"TZ", ~"America/Los_Angeles");
         tzset();
 
@@ -1144,7 +1144,7 @@ mod tests {
         assert!(test(~"%", ~"%%"));
     }
 
-    pub fn test_ctime() {
+    fn test_ctime() {
         os::setenv(~"TZ", ~"America/Los_Angeles");
         tzset();
 
@@ -1158,7 +1158,7 @@ mod tests {
         assert!(local.ctime() == ~"Fri Feb 13 15:31:30 2009");
     }
 
-    pub fn test_strftime() {
+    fn test_strftime() {
         os::setenv(~"TZ", ~"America/Los_Angeles");
         tzset();
 
@@ -1231,7 +1231,7 @@ mod tests {
         assert!(utc.rfc3339() == ~"2009-02-13T23:31:30Z");
     }
 
-    pub fn test_timespec_eq_ord() {
+    fn test_timespec_eq_ord() {
         use core::cmp::{eq, ge, gt, le, lt, ne};
 
         let a = &Timespec::new(-2, 1);
@@ -1265,7 +1265,7 @@ mod tests {
     }
 
     #[test]
-    pub fn run_tests() {
+    fn run_tests() {
         // The tests race on tzset. So instead of having many independent
         // tests, we will just call the functions now.
         test_get_time();
diff --git a/src/libstd/timer.rs b/src/libstd/timer.rs
index 99e772b0c95..c229e72ae5d 100644
--- a/src/libstd/timer.rs
+++ b/src/libstd/timer.rs
@@ -183,13 +183,13 @@ mod test {
     use core::pipes::{stream, SharedChan};
 
     #[test]
-    pub fn test_gl_timer_simple_sleep_test() {
+    fn test_gl_timer_simple_sleep_test() {
         let hl_loop = &uv::global_loop::get();
         sleep(hl_loop, 1u);
     }
 
     #[test]
-    pub fn test_gl_timer_sleep_stress1() {
+    fn test_gl_timer_sleep_stress1() {
         let hl_loop = &uv::global_loop::get();
         for iter::repeat(50u) {
             sleep(hl_loop, 1u);
@@ -197,7 +197,7 @@ mod test {
     }
 
     #[test]
-    pub fn test_gl_timer_sleep_stress2() {
+    fn test_gl_timer_sleep_stress2() {
         let (po, ch) = stream();
         let ch = SharedChan(ch);
         let hl_loop = &uv::global_loop::get();
@@ -241,7 +241,7 @@ mod test {
 
     #[test]
     #[cfg(ignore)]
-    pub fn test_gl_timer_recv_timeout_before_time_passes() {
+    fn test_gl_timer_recv_timeout_before_time_passes() {
         let times = 100;
         let mut successes = 0;
         let mut failures = 0;
@@ -270,7 +270,7 @@ mod test {
     }
 
     #[test]
-    pub fn test_gl_timer_recv_timeout_after_time_passes() {
+    fn test_gl_timer_recv_timeout_after_time_passes() {
         let times = 100;
         let mut successes = 0;
         let mut failures = 0;
diff --git a/src/libstd/uv_ll.rs b/src/libstd/uv_ll.rs
index 3bf297027d4..740ecec001f 100644
--- a/src/libstd/uv_ll.rs
+++ b/src/libstd/uv_ll.rs
@@ -1225,7 +1225,7 @@ pub unsafe fn addrinfo_as_sockaddr_in6(input: *addrinfo) -> *sockaddr_in6 {
 }
 
 #[cfg(test)]
-pub mod test {
+mod test {
     use core::prelude::*;
     use core::comm::{SharedChan, stream, GenericChan, GenericPort};
     use super::*;
@@ -1759,11 +1759,11 @@ pub mod test {
     #[cfg(target_os="darwin")]
     #[cfg(target_os="linux")]
     #[cfg(target_os="android")]
-    pub mod tcp_and_server_client_test {
+    mod tcp_and_server_client_test {
         #[cfg(target_arch="x86_64")]
-        pub mod impl64 {
+        mod impl64 {
             #[test]
-            pub fn test_uv_ll_tcp_server_and_request() {
+            fn test_uv_ll_tcp_server_and_request() {
                 unsafe {
                     super::super::impl_uv_tcp_server_and_request();
                 }
@@ -1772,10 +1772,10 @@ pub mod test {
         #[cfg(target_arch="x86")]
         #[cfg(target_arch="arm")]
         #[cfg(target_arch="mips")]
-        pub mod impl32 {
+        mod impl32 {
             #[test]
             #[ignore(cfg(target_os = "linux"))]
-            pub fn test_uv_ll_tcp_server_and_request() {
+            fn test_uv_ll_tcp_server_and_request() {
                 unsafe {
                     super::super::impl_uv_tcp_server_and_request();
                 }