Skip to content

Commit ce1be4d

Browse files
committed
Cleanup the existing platform-specific ignored tests
1 parent f7ebe23 commit ce1be4d

File tree

4 files changed

+11
-55
lines changed

4 files changed

+11
-55
lines changed

src/test/stdtest/io.rs

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import std::io;
44
import std::str;
55
import std::result;
66

7-
#[cfg(target_os = "linux")]
8-
#[cfg(target_os = "win32")]
7+
// FIXME (726)
98
#[test]
9+
#[ignore(cfg(target_os = "macos"))]
1010
fn test_simple() {
1111
let tmpfile: str = "test/run-pass/lib-io-test-simple.tmp";
1212
log tmpfile;
@@ -23,12 +23,6 @@ fn test_simple() {
2323
assert (str::eq(frood, frood2));
2424
}
2525

26-
// FIXME (726)
27-
#[cfg(target_os = "macos")]
28-
#[test]
29-
#[ignore]
30-
fn test_simple() { }
31-
3226
#[test]
3327
fn file_reader_not_exist() {
3428
alt io::file_reader("not a file") {
@@ -39,9 +33,9 @@ fn file_reader_not_exist() {
3933
}
4034
}
4135

42-
#[cfg(target_os = "linux")]
43-
#[cfg(target_os = "win32")]
4436
#[test]
37+
// FIXME (726)
38+
#[ignore(cfg(target_os = "macos"))]
4539
fn file_buf_writer_bad_name() {
4640
alt io::file_buf_writer("/?", []) {
4741
result::err(e) {
@@ -51,15 +45,9 @@ fn file_buf_writer_bad_name() {
5145
}
5246
}
5347

54-
// FIXME (726)
55-
#[cfg(target_os = "macos")]
56-
#[test]
57-
#[ignore]
58-
fn file_buf_writer_bad_name() { }
59-
60-
#[cfg(target_os = "linux")]
61-
#[cfg(target_os = "win32")]
6248
#[test]
49+
// FIXME (726)
50+
#[ignore(cfg(target_os = "macos"))]
6351
fn buffered_file_buf_writer_bad_name() {
6452
alt io::buffered_file_buf_writer("/?") {
6553
result::err(e) {
@@ -68,9 +56,3 @@ fn buffered_file_buf_writer_bad_name() {
6856
result::ok(_) { fail; }
6957
}
7058
}
71-
72-
// FIXME (726)
73-
#[cfg(target_os = "macos")]
74-
#[test]
75-
#[ignore]
76-
fn buffered_file_buf_writer_bad_name() { }

src/test/stdtest/run.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,13 @@ import std::str;
77
import std::vec;
88

99
// Regression test for memory leaks
10-
#[cfg(target_os = "linux")]
11-
#[cfg(target_os = "macos")]
12-
#[test]
10+
#[ignore(cfg(target_os = "win32"))] // FIXME
1311
fn test_leaks() {
1412
run::run_program("echo", []);
1513
run::start_program("echo", []);
1614
run::program_output("echo", []);
1715
}
1816

19-
// FIXME
20-
#[cfg(target_os = "win32")]
21-
#[test]
22-
#[ignore]
23-
fn test_leaks() { }
24-
2517
#[test]
2618
fn test_pipes() unsafe {
2719
let pipe_in = os::pipe();

src/test/stdtest/task.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@ fn test_sleep() { task::sleep(1000000u); }
77

88
// FIXME: Leaks on windows
99
#[test]
10-
#[cfg(target_os = "win32")]
11-
#[ignore]
12-
fn test_unsupervise() { }
13-
14-
#[test]
15-
#[cfg(target_os = "macos")]
16-
#[cfg(target_os = "linux")]
10+
#[ignore(cfg(target_os = "win32"))]
1711
fn test_unsupervise() {
1812
fn f(&&_i: ()) { task::unsupervise(); fail; }
1913
task::spawn((), f);
@@ -48,13 +42,7 @@ fn test_join_chan() {
4842

4943
// FIXME: Leaks on windows
5044
#[test]
51-
#[cfg(target_os = "win32")]
52-
#[ignore]
53-
fn test_join_chan_fail() { }
54-
55-
#[test]
56-
#[cfg(target_os = "macos")]
57-
#[cfg(target_os = "linux")]
45+
#[ignore(cfg(target_os = "win32"))]
5846
fn test_join_chan_fail() {
5947
fn failer(&&_i: ()) { task::unsupervise(); fail }
6048

src/test/stdtest/vec.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,9 @@ fn init() {
450450
assert v == [1, 2];
451451
}
452452

453-
#[cfg(target_os = "linux")]
454-
#[cfg(target_os = "mac")]
455453
#[test]
454+
// FIXME: Windows can't undwind
455+
#[ignore(cfg(target_os = "win32"))]
456456
fn init_empty() {
457457

458458
let r = task::join(
@@ -463,12 +463,6 @@ fn init_empty() {
463463
assert r == task::tr_failure
464464
}
465465

466-
// FIXME: Windows can't undwind
467-
#[cfg(target_os = "win32")]
468-
#[test]
469-
#[ignore]
470-
fn init_empty() { }
471-
472466
#[test]
473467
fn concat() {
474468
assert vec::concat([[1], [2,3]]) == [1, 2, 3];

0 commit comments

Comments
 (0)