mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Add various test cases (xfailed)
This commit is contained in:
parent
ab89b5c294
commit
f6211ab187
3
src/test/auxiliary/issue_3136_a.rc
Normal file
3
src/test/auxiliary/issue_3136_a.rc
Normal file
@ -0,0 +1,3 @@
|
||||
#[crate_type = "lib"];
|
||||
|
||||
pub mod issue_3136_a;
|
15
src/test/auxiliary/issue_3136_a.rs
Normal file
15
src/test/auxiliary/issue_3136_a.rs
Normal 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 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
12
src/test/compile-fail/issue-2074.rs
Normal file
12
src/test/compile-fail/issue-2074.rs
Normal 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();
|
||||
}
|
8
src/test/compile-fail/issue-3214.rs
Normal file
8
src/test/compile-fail/issue-3214.rs
Normal file
@ -0,0 +1,8 @@
|
||||
// xfail-test
|
||||
fn foo<T>() {
|
||||
struct foo {
|
||||
mut x: T, //~ ERROR quux
|
||||
drop { }
|
||||
}
|
||||
}
|
||||
fn main() { }
|
11
src/test/run-pass/issue-2284.rs
Normal file
11
src/test/run-pass/issue-2284.rs
Normal file
@ -0,0 +1,11 @@
|
||||
// xfail-test
|
||||
trait Send {
|
||||
fn f();
|
||||
}
|
||||
|
||||
fn f<T: Send>(t: T) {
|
||||
t.f();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
}
|
25
src/test/run-pass/issue-3447.rs
Normal file
25
src/test/run-pass/issue-3447.rs
Normal 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);
|
||||
}
|
10
src/test/run-pass/issue-3521.rs
Normal file
10
src/test/run-pass/issue-3521.rs
Normal file
@ -0,0 +1,10 @@
|
||||
// xfail-test
|
||||
fn main() {
|
||||
let foo = 100;
|
||||
|
||||
enum Stuff {
|
||||
Bar = foo
|
||||
}
|
||||
|
||||
log(error, Bar);
|
||||
}
|
6
src/test/run-pass/issue_3136_b.rs
Normal file
6
src/test/run-pass/issue_3136_b.rs
Normal 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() {}
|
||||
|
Loading…
Reference in New Issue
Block a user