Skip to content

Commit f6211ab

Browse files
committed
Add various test cases (xfailed)
1 parent ab89b5c commit f6211ab

File tree

8 files changed

+90
-0
lines changed

8 files changed

+90
-0
lines changed

src/test/auxiliary/issue_3136_a.rc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#[crate_type = "lib"];
2+
3+
pub mod issue_3136_a;

src/test/auxiliary/issue_3136_a.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
trait x {
2+
fn use_x<T>();
3+
}
4+
enum y = ();
5+
impl y:x {
6+
fn use_x<T>() {
7+
struct foo { //~ ERROR quux
8+
i: ()
9+
}
10+
fn new_foo<T>(i: ()) -> foo {
11+
foo { i: i }
12+
}
13+
}
14+
}
15+

src/test/compile-fail/issue-2074.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// xfail-test
2+
fn main() {
3+
let one = fn@() -> uint {
4+
enum r { a };
5+
return a as uint;
6+
};
7+
let two = fn@() -> uint {
8+
enum r { a };
9+
return a as uint;
10+
};
11+
one(); two();
12+
}

src/test/compile-fail/issue-3214.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// xfail-test
2+
fn foo<T>() {
3+
struct foo {
4+
mut x: T, //~ ERROR quux
5+
drop { }
6+
}
7+
}
8+
fn main() { }

src/test/run-pass/issue-2284.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// xfail-test
2+
trait Send {
3+
fn f();
4+
}
5+
6+
fn f<T: Send>(t: T) {
7+
t.f();
8+
}
9+
10+
fn main() {
11+
}

src/test/run-pass/issue-3447.rs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// xfail-test
2+
struct list<T> {
3+
element: &self/T,
4+
mut next: Option<@list<T>>
5+
}
6+
7+
impl<T> list<T>{
8+
fn addEnd(&self, element: &self/T) {
9+
let newList = list {
10+
element: element,
11+
next: option::None
12+
};
13+
14+
self.next = Some(@newList);
15+
}
16+
}
17+
18+
fn main() {
19+
let s = @"str";
20+
let ls: list<@str> = list {
21+
element: &s,
22+
next: option::None
23+
};
24+
io::println(*ls.element);
25+
}

src/test/run-pass/issue-3521.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// xfail-test
2+
fn main() {
3+
let foo = 100;
4+
5+
enum Stuff {
6+
Bar = foo
7+
}
8+
9+
log(error, Bar);
10+
}

src/test/run-pass/issue_3136_b.rs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// xfail-fast - check-fast doesn't understand aux-build
2+
// aux-build:issue_3136_a.rc
3+
4+
extern mod issue_3136_a;
5+
fn main() {}
6+

0 commit comments

Comments
 (0)