Skip to content

Commit a642561

Browse files
committed
---
yaml --- r: 20772 b: refs/heads/snap-stage3 c: c4bb8f8 h: refs/heads/master v: v3
1 parent 1458efc commit a642561

File tree

5 files changed

+28
-26
lines changed

5 files changed

+28
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 7b2026bf218c416c653faf8bb8cca770d0bb2c0d
4+
refs/heads/snap-stage3: c4bb8f8aafd25b9d5e68481af7088ab9e47c1e29
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/at_vec.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,19 @@ mod unsafe {
198198
}
199199

200200
}
201+
202+
#[test]
203+
fn test() {
204+
// Some code that could use that, then:
205+
fn seq_range(lo: uint, hi: uint) -> @[uint] {
206+
do build |push| {
207+
for uint::range(lo, hi) |i| {
208+
push(i);
209+
}
210+
}
211+
}
212+
213+
assert seq_range(10, 15) == @[10, 11, 12, 13, 14];
214+
assert from_fn(5, |x| x+1) == @[1, 2, 3, 4, 5];
215+
assert from_elem(5, 3.14) == @[3.14, 3.14, 3.14, 3.14, 3.14];
216+
}

branches/snap-stage3/src/libcore/ptr.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,14 @@ fn test_buf_len() {
200200
}
201201
}
202202
}
203+
204+
#[test]
205+
fn test_is_null() {
206+
let p: *int = ptr::null();
207+
assert p.is_null();
208+
assert !p.is_not_null();
209+
210+
let q = ptr::offset(p, 1u);
211+
assert !q.is_null();
212+
assert q.is_not_null();
213+
}

branches/snap-stage3/src/test/run-pass/at_vec_building.rs

Lines changed: 0 additions & 16 deletions
This file was deleted.

branches/snap-stage3/src/test/run-pass/ptr-is-null.rs

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)