Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests and un-xfail a few issues #9805

Merged
merged 1 commit into from
Oct 11, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/test/auxiliary/issue-4545.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

pub struct S<T>(Option<T>);
pub fn mk<T>() -> S<T> { S(None) }
27 changes: 27 additions & 0 deletions src/test/auxiliary/issue-8044.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[feature(struct_variant)];

pub struct BTree<V> {
node: TreeItem<V>,
}

pub enum TreeItem<V> {
TreeLeaf { value: V },
}

pub fn leaf<V>(value: V) -> TreeItem<V> {
TreeLeaf { value: value }
}

fn main() {
BTree::<int> { node: leaf(1) };
}
15 changes: 15 additions & 0 deletions src/test/run-pass/issue-4545.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-fast windows doesn't like aux-build
// aux-build:issue-4545.rs

extern mod somelib(name = "issue-4545");
fn main() { somelib::mk::<int>(); }
20 changes: 20 additions & 0 deletions src/test/run-pass/issue-5791.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::libc;

extern {
#[link_name = "malloc"]
fn malloc1(len: libc::c_int) -> *libc::c_void;
#[link_name = "malloc"]
fn malloc2(len: libc::c_int, foo: libc::c_int) -> *libc::c_void;
}

pub fn main () {}
5 changes: 1 addition & 4 deletions src/test/run-pass/issue-6470.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-test

pub mod Bar {
pub struct Foo {
v: int,
Expand All @@ -21,5 +19,4 @@ pub mod Bar {
}
}

fn main() { }

pub fn main() { }
19 changes: 19 additions & 0 deletions src/test/run-pass/issue-8044.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-fast windows doesn't like aux-build
// aux-build:issue-8044.rs

extern mod minimal(name= "issue-8044");
use minimal::{BTree, leaf};

fn main() {
BTree::<int> { node: leaf(1) };
}