Skip to content

Commit 1503bd5

Browse files
committed
---
yaml --- r: 56167 b: refs/heads/auto c: 39d45b7 h: refs/heads/master i: 56165: c9b1268 56163: d742d4a 56159: 1f97ca6 v: v3
1 parent 14076df commit 1503bd5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2905
-2865
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 40e3577b0834794b2d44e6c527fda90d1adbc88e
17+
refs/heads/auto: 39d45b75cc4971a9fd5797c120b362612ff23b13
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libcore/at_vec.rs

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -277,49 +277,45 @@ pub mod raw {
277277
pub unsafe fn reserve_at_least<T>(v: &mut @[T], n: uint) {
278278
reserve(v, uint::next_power_of_two(n));
279279
}
280+
280281
}
281282

282-
#[cfg(test)]
283-
mod test {
284-
use super::*;
285-
use prelude::*;
286-
287-
#[test]
288-
fn test() {
289-
// Some code that could use that, then:
290-
fn seq_range(lo: uint, hi: uint) -> @[uint] {
291-
do build |push| {
292-
for uint::range(lo, hi) |i| {
293-
push(i);
294-
}
283+
#[test]
284+
pub fn test() {
285+
// Some code that could use that, then:
286+
fn seq_range(lo: uint, hi: uint) -> @[uint] {
287+
do build |push| {
288+
for uint::range(lo, hi) |i| {
289+
push(i);
295290
}
296291
}
297-
298-
assert_eq!(seq_range(10, 15), @[10, 11, 12, 13, 14]);
299-
assert!(from_fn(5, |x| x+1) == @[1, 2, 3, 4, 5]);
300-
assert!(from_elem(5, 3.14) == @[3.14, 3.14, 3.14, 3.14, 3.14]);
301292
}
302293

303-
#[test]
304-
fn append_test() {
305-
assert!(@[1,2,3] + @[4,5,6] == @[1,2,3,4,5,6]);
306-
}
294+
assert_eq!(seq_range(10, 15), @[10, 11, 12, 13, 14]);
295+
assert!(from_fn(5, |x| x+1) == @[1, 2, 3, 4, 5]);
296+
assert!(from_elem(5, 3.14) == @[3.14, 3.14, 3.14, 3.14, 3.14]);
297+
}
307298

308-
#[test]
309-
fn test_from_owned() {
310-
assert!(from_owned::<int>(~[]) == @[]);
311-
assert!(from_owned(~[true]) == @[true]);
312-
assert!(from_owned(~[1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
313-
assert!(from_owned(~[~"abc", ~"123"]) == @[~"abc", ~"123"]);
314-
assert!(from_owned(~[~[42]]) == @[~[42]]);
315-
}
299+
#[test]
300+
pub fn append_test() {
301+
assert!(@[1,2,3] + @[4,5,6] == @[1,2,3,4,5,6]);
302+
}
303+
304+
#[test]
305+
pub fn test_from_owned() {
306+
assert!(from_owned::<int>(~[]) == @[]);
307+
assert!(from_owned(~[true]) == @[true]);
308+
assert!(from_owned(~[1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
309+
assert!(from_owned(~[~"abc", ~"123"]) == @[~"abc", ~"123"]);
310+
assert!(from_owned(~[~[42]]) == @[~[42]]);
311+
}
312+
313+
#[test]
314+
pub fn test_from_slice() {
315+
assert!(from_slice::<int>([]) == @[]);
316+
assert!(from_slice([true]) == @[true]);
317+
assert!(from_slice([1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
318+
assert!(from_slice([@"abc", @"123"]) == @[@"abc", @"123"]);
319+
assert!(from_slice([@[42]]) == @[@[42]]);
320+
}
316321

317-
#[test]
318-
fn test_from_slice() {
319-
assert!(from_slice::<int>([]) == @[]);
320-
assert!(from_slice([true]) == @[true]);
321-
assert!(from_slice([1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
322-
assert!(from_slice([@"abc", @"123"]) == @[@"abc", @"123"]);
323-
assert!(from_slice([@[42]]) == @[@[42]]);
324-
}
325-
}

branches/auto/src/libcore/cast.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,16 @@ pub unsafe fn copy_lifetime_vec<'a,S,T>(_ptr: &'a [S], ptr: &T) -> &'a T {
111111
****************************************************************************/
112112

113113
#[cfg(test)]
114-
mod tests {
114+
pub mod tests {
115115
use cast::{bump_box_refcount, reinterpret_cast, transmute};
116116

117117
#[test]
118-
fn test_reinterpret_cast() {
118+
pub fn test_reinterpret_cast() {
119119
assert!(1u == unsafe { reinterpret_cast(&1) });
120120
}
121121

122122
#[test]
123-
fn test_bump_box_refcount() {
123+
pub fn test_bump_box_refcount() {
124124
unsafe {
125125
let box = @~"box box box"; // refcount 1
126126
bump_box_refcount(box); // refcount 2
@@ -135,7 +135,7 @@ mod tests {
135135
}
136136
137137
#[test]
138-
fn test_transmute() {
138+
pub fn test_transmute() {
139139
use managed::raw::BoxRepr;
140140
unsafe {
141141
let x = @100u8;
@@ -146,7 +146,7 @@ mod tests {
146146
}
147147
148148
#[test]
149-
fn test_transmute2() {
149+
pub fn test_transmute2() {
150150
unsafe {
151151
assert!(~[76u8, 0u8] == transmute(~"L"));
152152
}

branches/auto/src/libcore/comm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,12 +426,12 @@ pub fn try_send_one<T: Owned>(chan: ChanOne<T>, data: T)
426426
}
427427
428428
#[cfg(test)]
429-
mod test {
429+
pub mod test {
430430
use either::Right;
431431
use super::{Chan, Port, oneshot, recv_one, stream};
432432
433433
#[test]
434-
fn test_select2() {
434+
pub fn test_select2() {
435435
let (p1, c1) = stream();
436436
let (p2, c2) = stream();
437437
@@ -446,7 +446,7 @@ mod test {
446446
}
447447

448448
#[test]
449-
fn test_oneshot() {
449+
pub fn test_oneshot() {
450450
let (c, p) = oneshot::init();
451451

452452
oneshot::client::send(c, ());

0 commit comments

Comments
 (0)