Skip to content

Commit be38332

Browse files
committed
---
yaml --- r: 145096 b: refs/heads/try2 c: 48f61ec h: refs/heads/master v: v3
1 parent d38d8d4 commit be38332

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 8149e5c99f4fddae5d442fdedfda4c085249a12e
8+
refs/heads/try2: 48f61ecbf93740359b62ad5326e70759e738d9e6
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libstd/iter.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2708,6 +2708,16 @@ mod tests {
27082708
}
27092709
}
27102710

2711+
#[test]
2712+
fn test_range() {
2713+
assert_eq!(range(0i, 5).collect::<~[int]>(), ~[0i, 1, 2, 3, 4]);
2714+
assert_eq!(range(0i, 5).invert().collect::<~[int]>(), ~[4, 3, 2, 1, 0]);
2715+
assert_eq!(range(200, -5).collect::<~[int]>(), ~[]);
2716+
assert_eq!(range(200, -5).invert().collect::<~[int]>(), ~[]);
2717+
assert_eq!(range(200, 200).collect::<~[int]>(), ~[]);
2718+
assert_eq!(range(200, 200).invert().collect::<~[int]>(), ~[]);
2719+
}
2720+
27112721
#[test]
27122722
fn test_range_inclusive() {
27132723
assert_eq!(range_inclusive(0i, 5).collect::<~[int]>(), ~[0i, 1, 2, 3, 4, 5]);

0 commit comments

Comments
 (0)