Skip to content

Commit

Permalink
Add tests and un-xfail a few issues
Browse files Browse the repository at this point in the history
Closes #4545
Closes #5791
Closes #6470
Closes #8044
  • Loading branch information
alexcrichton committed Oct 11, 2013
1 parent 6ad1d0f commit 478c9b7
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 4 deletions.
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) };
}

5 comments on commit 478c9b7

@bors
Copy link
Contributor

@bors bors commented on 478c9b7 Oct 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at alexcrichton@478c9b7

@bors
Copy link
Contributor

@bors bors commented on 478c9b7 Oct 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging alexcrichton/rust/needstest = 478c9b7 into auto

@bors
Copy link
Contributor

@bors bors commented on 478c9b7 Oct 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alexcrichton/rust/needstest = 478c9b7 merged ok, testing candidate = 5bddcc1

@bors
Copy link
Contributor

@bors bors commented on 478c9b7 Oct 11, 2013

@bors
Copy link
Contributor

@bors bors commented on 478c9b7 Oct 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 5bddcc1

Please sign in to comment.