Add various test cases (xfailed)

This commit is contained in:
Tim Chevalier 2012-10-15 12:00:32 -07:00
parent ab89b5c294
commit f6211ab187
8 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,3 @@
#[crate_type = "lib"];
pub mod issue_3136_a;

View File

@ -0,0 +1,15 @@
trait x {
fn use_x<T>();
}
enum y = ();
impl y:x {
fn use_x<T>() {
struct foo { //~ ERROR quux
i: ()
}
fn new_foo<T>(i: ()) -> foo {
foo { i: i }
}
}
}

View File

@ -0,0 +1,12 @@
// xfail-test
fn main() {
let one = fn@() -> uint {
enum r { a };
return a as uint;
};
let two = fn@() -> uint {
enum r { a };
return a as uint;
};
one(); two();
}

View File

@ -0,0 +1,8 @@
// xfail-test
fn foo<T>() {
struct foo {
mut x: T, //~ ERROR quux
drop { }
}
}
fn main() { }

View File

@ -0,0 +1,11 @@
// xfail-test
trait Send {
fn f();
}
fn f<T: Send>(t: T) {
t.f();
}
fn main() {
}

View File

@ -0,0 +1,25 @@
// xfail-test
struct list<T> {
element: &self/T,
mut next: Option<@list<T>>
}
impl<T> list<T>{
fn addEnd(&self, element: &self/T) {
let newList = list {
element: element,
next: option::None
};
self.next = Some(@newList);
}
}
fn main() {
let s = @"str";
let ls: list<@str> = list {
element: &s,
next: option::None
};
io::println(*ls.element);
}

View File

@ -0,0 +1,10 @@
// xfail-test
fn main() {
let foo = 100;
enum Stuff {
Bar = foo
}
log(error, Bar);
}

View File

@ -0,0 +1,6 @@
// xfail-fast - check-fast doesn't understand aux-build
// aux-build:issue_3136_a.rc
extern mod issue_3136_a;
fn main() {}