From 44ab00ee37c4ffb8440ff20fd8a15cd24a6f3e46 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 8 Jan 2013 19:29:16 -0800 Subject: Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc" This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6. --- src/libstd/test.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/libstd/test.rs') diff --git a/src/libstd/test.rs b/src/libstd/test.rs index 8b4c53604bc..176953663eb 100644 --- a/src/libstd/test.rs +++ b/src/libstd/test.rs @@ -29,7 +29,6 @@ use core::io; use core::libc::size_t; use core::oldcomm; use core::option; -use core::prelude::*; use core::result; use core::str; use core::task::TaskBuilder; @@ -80,7 +79,7 @@ pub type TestOpts = {filter: Option<~str>, run_ignored: bool, type OptRes = Either; // Parses command line arguments into test options -pub fn parse_opts(args: &[~str]) -> OptRes { +fn parse_opts(args: &[~str]) -> OptRes { let args_ = vec::tail(args); let opts = ~[getopts::optflag(~"ignored"), getopts::optopt(~"logfile")]; let matches = @@ -284,9 +283,9 @@ enum TestEvent { type MonitorMsg = (TestDesc, TestResult); -fn run_tests(opts: &TestOpts, - tests: &[TestDesc], +fn run_tests(opts: &TestOpts, tests: &[TestDesc], callback: fn@(e: TestEvent)) { + let mut filtered_tests = filter_tests(opts, tests); callback(TeFiltered(copy filtered_tests)); @@ -341,9 +340,8 @@ fn get_concurrency() -> uint { } #[allow(non_implicitly_copyable_typarams)] -pub fn filter_tests(opts: &TestOpts, - tests: &[TestDesc]) - -> ~[TestDesc] { +fn filter_tests(opts: &TestOpts, + tests: &[TestDesc]) -> ~[TestDesc] { let mut filtered = vec::slice(tests, 0, tests.len()); // Remove tests that don't match the test filter @@ -395,7 +393,7 @@ pub fn filter_tests(opts: &TestOpts, type TestFuture = {test: TestDesc, wait: fn@() -> TestResult}; -pub fn run_test(test: TestDesc, monitor_ch: oldcomm::Chan) { +fn run_test(test: TestDesc, monitor_ch: oldcomm::Chan) { if test.ignore { oldcomm::send(monitor_ch, (copy test, TrIgnored)); return; @@ -427,8 +425,6 @@ fn calc_result(test: &TestDesc, task_succeeded: bool) -> TestResult { mod tests { #[legacy_exports]; - use test::{TrFailed, TrIgnored, TrOk, filter_tests, parse_opts, run_test}; - use core::either; use core::oldcomm; use core::option; -- cgit 1.4.1-3-g733a5