Skip to content

Commit 64dd1c1

Browse files
committed
---
yaml --- r: 55549 b: refs/heads/master c: 442b8e5 h: refs/heads/master i: 55547: e96a079 v: v3
1 parent 4b48b0e commit 64dd1c1

Some content is hidden

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

54 files changed

+2887
-2837
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ef3a8ebb9bbc55bea4e0b62a1dcb6abb5512b223
2+
refs/heads/master: 442b8e590111b3d00fa2b3160c469dee392c9573
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a

trunk/AUTHORS.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Bilal Husain <[email protected]>
3131
Bill Fallon <[email protected]>
3232
Brendan Eich <[email protected]>
3333
Brendan Zabarauskas <[email protected]>
34+
Brett Cannon <[email protected]>
3435
Brian Anderson <[email protected]>
3536
Brian J. Burg <[email protected]>
3637
Brian Leibig <[email protected]>
@@ -50,6 +51,7 @@ Dave Herman <[email protected]>
5051
David Forsythe <[email protected]>
5152
David Klein <[email protected]>
5253
David Rajchenbach-Teller <[email protected]>
54+
Diggory Hardy <[email protected]>
5355
Dimitri Krassovski <[email protected]>
5456
Donovan Preston <[email protected]>
5557
Drew Willcoxon <[email protected]>
@@ -76,9 +78,11 @@ Ian D. Bollinger <[email protected]>
7678
Ilyong Cho <[email protected]>
7779
Isaac Aggrey <[email protected]>
7880
Ivano Coppola <[email protected]>
81+
Jack Moffitt <[email protected]>
7982
Jacob Harris Cryer Kragh <[email protected]>
8083
Jacob Parker <[email protected]>
8184
Jakub Wieczorek <[email protected]>
85+
James Miller <[email protected]>
8286
Jason Orendorff <[email protected]>
8387
Jed Davis <[email protected]>
8488
Jeff Balogh <[email protected]>

trunk/src/libcore/at_vec.rs

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -277,48 +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-
286-
#[test]
287-
fn test() {
288-
// Some code that could use that, then:
289-
fn seq_range(lo: uint, hi: uint) -> @[uint] {
290-
do build |push| {
291-
for uint::range(lo, hi) |i| {
292-
push(i);
293-
}
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);
294290
}
295291
}
296-
297-
assert_eq!(seq_range(10, 15), @[10, 11, 12, 13, 14]);
298-
assert!(from_fn(5, |x| x+1) == @[1, 2, 3, 4, 5]);
299-
assert!(from_elem(5, 3.14) == @[3.14, 3.14, 3.14, 3.14, 3.14]);
300292
}
301293

302-
#[test]
303-
fn append_test() {
304-
assert!(@[1,2,3] + @[4,5,6] == @[1,2,3,4,5,6]);
305-
}
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+
}
306298

307-
#[test]
308-
fn test_from_owned() {
309-
assert!(from_owned::<int>(~[]) == @[]);
310-
assert!(from_owned(~[true]) == @[true]);
311-
assert!(from_owned(~[1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
312-
assert!(from_owned(~[~"abc", ~"123"]) == @[~"abc", ~"123"]);
313-
assert!(from_owned(~[~[42]]) == @[~[42]]);
314-
}
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+
}
315321

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

trunk/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
}

trunk/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)