about summary refs log tree commit diff
path: root/src/libstd/test.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-01-08 19:29:16 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-01-08 19:29:16 -0800
commit44ab00ee37c4ffb8440ff20fd8a15cd24a6f3e46 (patch)
tree83f3d67a9e21c6ce1b99c2ce8f6a737896c673db /src/libstd/test.rs
parenta8d37af2473da79be704c9ce2374f278c47177b6 (diff)
downloadrust-44ab00ee37c4ffb8440ff20fd8a15cd24a6f3e46.tar.gz
rust-44ab00ee37c4ffb8440ff20fd8a15cd24a6f3e46.zip
Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6.
Diffstat (limited to 'src/libstd/test.rs')
-rw-r--r--src/libstd/test.rs16
1 files changed, 6 insertions, 10 deletions
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<TestOpts, ~str>;
 
 // 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<MonitorMsg>) {
+fn run_test(test: TestDesc, monitor_ch: oldcomm::Chan<MonitorMsg>) {
     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;