Skip to content

Commit 70e3039

Browse files
committed
Do not use #[start] in tests.
1 parent b5a5a8b commit 70e3039

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

tests/tokenizer.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
#![feature(start, rt, test, slice_patterns)]
10+
#![feature(test, slice_patterns)]
1111
#![cfg_attr(feature = "unstable", feature(plugin))]
1212
#![cfg_attr(feature = "unstable", plugin(string_cache_plugin))]
1313

@@ -21,7 +21,7 @@ extern crate html5ever;
2121
mod foreach_html5lib_test;
2222
use foreach_html5lib_test::foreach_html5lib_test;
2323

24-
use std::{char, env, rt};
24+
use std::{char, env};
2525
use std::ffi::OsStr;
2626
use std::mem::replace;
2727
use std::default::Default;
@@ -419,12 +419,8 @@ fn tests(src_dir: &Path) -> Vec<TestDescAndFn> {
419419
tests
420420
}
421421

422-
#[start]
423-
fn start(argc: isize, argv: *const *const u8) -> isize {
424-
unsafe {
425-
rt::args::init(argc, argv);
426-
}
422+
#[test]
423+
fn main() {
427424
let args: Vec<_> = env::args().collect();
428425
test::test_main(&args, tests(Path::new(env!("CARGO_MANIFEST_DIR"))));
429-
0
430426
}

tests/tree_builder.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
#![feature(start, rt, test)]
10+
#![feature(test)]
1111

1212
#![cfg_attr(feature = "unstable", feature(plugin))]
1313
#![cfg_attr(feature = "unstable", plugin(string_cache_plugin))]
@@ -21,7 +21,7 @@ extern crate html5ever;
2121
mod foreach_html5lib_test;
2222
use foreach_html5lib_test::foreach_html5lib_test;
2323

24-
use std::{fs, io, env, rt};
24+
use std::{fs, io, env};
2525
use std::io::BufRead;
2626
use std::ffi::OsStr;
2727
use std::iter::repeat;
@@ -229,11 +229,8 @@ fn tests(src_dir: &Path, ignores: &HashSet<String>) -> Vec<TestDescAndFn> {
229229
tests
230230
}
231231

232-
#[start]
233-
fn start(argc: isize, argv: *const *const u8) -> isize {
234-
unsafe {
235-
rt::args::init(argc, argv);
236-
}
232+
#[test]
233+
fn main() {
237234
let args: Vec<_> = env::args().collect();
238235
let src_dir = Path::new(env!("CARGO_MANIFEST_DIR"));
239236
let mut ignores = HashSet::new();
@@ -246,5 +243,4 @@ fn start(argc: isize, argv: *const *const u8) -> isize {
246243
}
247244

248245
test::test_main(&args, tests(src_dir, &ignores));
249-
0
250246
}

0 commit comments

Comments
 (0)