Skip to content

Commit 9b30fa3

Browse files
committed
Correct testcases that passed because fns with #[test] were stripped before expansion.
1 parent ea5c413 commit 9b30fa3

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

src/test/run-pass/issue-2904.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@ mod test {
7979
pub fn trivial_to_str() {
8080
assert!(lambda.to_str() == "\\")
8181
}
82-
83-
#[test]
84-
pub fn read_simple_board() {
85-
let s = include_str!("./maps/contest1.map");
86-
io::with_str_reader(s, read_board_grid)
87-
}
8882
}
8983

9084
pub fn main() {}

src/test/run-pass/issue-3424.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ use core::path::{Path};
1616

1717
type rsrc_loader = ~fn(path: &Path) -> result::Result<~str, ~str>;
1818

19-
#[test]
2019
fn tester()
2120
{
2221
let loader: rsrc_loader = |_path| {result::Ok(~"more blah")};
2322

24-
let path = path::from_str("blah");
23+
let path = path::Path("blah");
2524
assert!(loader(&path).is_ok());
2625
}
2726

src/test/run-pass/issue-3559.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// xfail-fast
1+
// xfail-test #4276
22

33
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
44
// file at the top-level directory of this distribution and at
@@ -15,7 +15,6 @@ extern mod std;
1515

1616
use core::io::{WriterUtil};
1717

18-
#[cfg(test)]
1918
fn check_strs(actual: &str, expected: &str) -> bool
2019
{
2120
if actual != expected
@@ -26,10 +25,9 @@ fn check_strs(actual: &str, expected: &str) -> bool
2625
return true;
2726
}
2827

29-
#[test]
3028
fn tester()
3129
{
32-
let mut table = core::hashmap::HashMap();
30+
let mut table = core::hashmap::HashMap::new();
3331
table.insert(@~"one", 1);
3432
table.insert(@~"two", 2);
3533
assert!(check_strs(table.to_str(), ~"xxx")); // not sure what expected should be

0 commit comments

Comments
 (0)