diff options
Diffstat (limited to 'src/libstd/bitv.rs')
| -rw-r--r-- | src/libstd/bitv.rs | 64 |
1 files changed, 32 insertions, 32 deletions
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 { |
