Skip to content

Commit 27834c2

Browse files
committed
test: Switch lib-either over to interior vectors. Puts out burning tinderbox.
1 parent ab579e1 commit 27834c2

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

src/test/run-pass/lib-either.rs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use std;
44
import std::either::*;
5-
import std::vec::len;
5+
import std::ivec::len;
66

77
fn test_either_left() {
88
auto val = left(10);
@@ -19,57 +19,57 @@ fn test_either_right() {
1919
}
2020

2121
fn test_lefts() {
22-
auto input = [left(10),
23-
right(11),
24-
left(12),
25-
right(13),
26-
left(14)];
22+
auto input = ~[left(10),
23+
right(11),
24+
left(12),
25+
right(13),
26+
left(14)];
2727
auto result = lefts(input);
28-
assert (result == [10, 12, 14]);
28+
assert (result == ~[10, 12, 14]);
2929
}
3030

3131
fn test_lefts_none() {
32-
let vec[t[int, int]] input = [right(10),
32+
let (t[int, int])[] input = ~[right(10),
3333
right(10)];
3434
auto result = lefts(input);
3535
assert (len(result) == 0u);
3636
}
3737

3838
fn test_lefts_empty() {
39-
let vec[t[int, int]] input = [];
39+
let (t[int, int])[] input = ~[];
4040
auto result = lefts(input);
4141
assert (len(result) == 0u);
4242
}
4343

4444
fn test_rights() {
45-
auto input = [left(10),
46-
right(11),
47-
left(12),
48-
right(13),
49-
left(14)];
45+
auto input = ~[left(10),
46+
right(11),
47+
left(12),
48+
right(13),
49+
left(14)];
5050
auto result = rights(input);
51-
assert (result == [11, 13]);
51+
assert (result == ~[11, 13]);
5252
}
5353

5454
fn test_rights_none() {
55-
let vec[t[int, int]] input = [left(10),
55+
let (t[int, int])[] input = ~[left(10),
5656
left(10)];
5757
auto result = rights(input);
5858
assert (len(result) == 0u);
5959
}
6060

6161
fn test_rights_empty() {
62-
let vec[t[int, int]] input = [];
62+
let (t[int, int])[] input = ~[];
6363
auto result = rights(input);
6464
assert (len(result) == 0u);
6565
}
6666

6767
fn test_partition() {
68-
auto input = [left(10),
69-
right(11),
70-
left(12),
71-
right(13),
72-
left(14)];
68+
auto input = ~[left(10),
69+
right(11),
70+
left(12),
71+
right(13),
72+
left(14)];
7373
auto result = partition(input);
7474
assert (result._0.(0) == 10);
7575
assert (result._0.(1) == 12);
@@ -79,23 +79,23 @@ fn test_partition() {
7979
}
8080

8181
fn test_partition_no_lefts() {
82-
let vec[t[int, int]] input = [right(10),
82+
let (t[int, int])[] input = ~[right(10),
8383
right(11)];
8484
auto result = partition(input);
8585
assert (len(result._0) == 0u);
8686
assert (len(result._1) == 2u);
8787
}
8888

8989
fn test_partition_no_rights() {
90-
let vec[t[int, int]] input = [left(10),
90+
let (t[int, int])[] input = ~[left(10),
9191
left(11)];
9292
auto result = partition(input);
9393
assert (len(result._0) == 2u);
9494
assert (len(result._1) == 0u);
9595
}
9696

9797
fn test_partition_empty() {
98-
let vec[t[int, int]] input = [];
98+
let (t[int, int])[] input = ~[];
9999
auto result = partition(input);
100100
assert (len(result._0) == 0u);
101101
assert (len(result._1) == 0u);
@@ -114,4 +114,4 @@ fn main() {
114114
test_partition_no_lefts();
115115
test_partition_no_rights();
116116
test_partition_empty();
117-
}
117+
}

0 commit comments

Comments
 (0)