Skip to content

Commit

Permalink
test: Modernize and un-XFAIL issue-2242-d.rs (issue #2242)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcwalton committed Aug 7, 2012
1 parent 9199d4b commit 5f05095
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/test/auxiliary/issue_2242_a.rs
Expand Up @@ -2,9 +2,9 @@
#[crate_type = "lib"];

trait to_str {
fn to_str() -> str;
fn to_str() -> ~str;
}

impl of to_str for str {
fn to_str() -> str { self }
impl of to_str for ~str {
fn to_str() -> ~str { self }
}
2 changes: 1 addition & 1 deletion src/test/auxiliary/issue_2242_b.rs
Expand Up @@ -5,5 +5,5 @@ use a;
import a::to_str;

impl of to_str for int {
fn to_str() -> str { fmt!{"%?", self} }
fn to_str() -> ~str { fmt!{"%?", self} }
}
2 changes: 1 addition & 1 deletion src/test/auxiliary/issue_2242_c.rs
Expand Up @@ -6,5 +6,5 @@ use a;
import a::to_str;

impl of to_str for bool {
fn to_str() -> str { fmt!{"%b", self} }
fn to_str() -> ~str { fmt!{"%b", self} }
}
6 changes: 2 additions & 4 deletions src/test/run-pass/issue-2242-d.rs
@@ -1,4 +1,3 @@
// xfail-test
// aux-build:issue_2242_a.rs
// aux-build:issue_2242_b.rs
// aux-build:issue_2242_c.rs
Expand All @@ -7,11 +6,10 @@ use a;
use b;
use c;

import b::to_str;
import c::to_str;
import a::to_str;

fn main() {
io::println("foo".to_str());
io::println((~"foo").to_str());
io::println(1.to_str());
io::println(true.to_str());
}

0 comments on commit 5f05095

Please sign in to comment.