Skip to content

Commit 13979eb

Browse files
committed
De-export std::test. Part of #3583.
1 parent 7ead3c0 commit 13979eb

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

src/libstd/std.rc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ mod unicode;
121121

122122
// Compiler support modules
123123

124-
#[legacy_exports]
125124
mod test;
126125
#[legacy_exports]
127126
mod serialization;

src/libstd/test.rs

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,6 @@ use libc::size_t;
1515
use task::TaskBuilder;
1616
use comm = core::comm;
1717

18-
export TestName;
19-
export TestFn;
20-
export TestDesc;
21-
export test_main;
22-
export TestResult;
23-
export TestOpts;
24-
export TrOk;
25-
export TrFailed;
26-
export TrIgnored;
27-
export run_tests_console;
28-
2918
#[abi = "cdecl"]
3019
extern mod rustrt {
3120
#[legacy_exports];
@@ -36,17 +25,17 @@ extern mod rustrt {
3625
// paths; i.e. it should be a series of identifiers seperated by double
3726
// colons. This way if some test runner wants to arrange the tests
3827
// hierarchically it may.
39-
type TestName = ~str;
28+
pub type TestName = ~str;
4029

4130
// A function that runs a test. If the function returns successfully,
4231
// the test succeeds; if the function fails then the test fails. We
4332
// may need to come up with a more clever definition of test in order
4433
// to support isolation of tests into tasks.
45-
type TestFn = fn~();
34+
pub type TestFn = fn~();
4635

4736
// The definition of a single test. A test runner will run a list of
4837
// these.
49-
type TestDesc = {
38+
pub type TestDesc = {
5039
name: TestName,
5140
testfn: TestFn,
5241
ignore: bool,
@@ -55,7 +44,7 @@ type TestDesc = {
5544

5645
// The default console test runner. It accepts the command line
5746
// arguments and a vector of test_descs (generated at compile time).
58-
fn test_main(args: &[~str], tests: &[TestDesc]) {
47+
pub fn test_main(args: &[~str], tests: &[TestDesc]) {
5948
let opts =
6049
match parse_opts(args) {
6150
either::Left(move o) => o,
@@ -64,7 +53,7 @@ fn test_main(args: &[~str], tests: &[TestDesc]) {
6453
if !run_tests_console(&opts, tests) { fail ~"Some tests failed"; }
6554
}
6655

67-
type TestOpts = {filter: Option<~str>, run_ignored: bool,
56+
pub type TestOpts = {filter: Option<~str>, run_ignored: bool,
6857
logfile: Option<~str>};
6958

7059
type OptRes = Either<TestOpts, ~str>;
@@ -93,7 +82,7 @@ fn parse_opts(args: &[~str]) -> OptRes {
9382
return either::Left(test_opts);
9483
}
9584

96-
enum TestResult { TrOk, TrFailed, TrIgnored, }
85+
pub enum TestResult { TrOk, TrFailed, TrIgnored, }
9786

9887
impl TestResult : Eq {
9988
pure fn eq(other: &TestResult) -> bool {
@@ -113,7 +102,7 @@ type ConsoleTestState =
113102
mut failures: ~[TestDesc]};
114103

115104
// A simple console test runner
116-
fn run_tests_console(opts: &TestOpts,
105+
pub fn run_tests_console(opts: &TestOpts,
117106
tests: &[TestDesc]) -> bool {
118107

119108
fn callback(event: &TestEvent, st: ConsoleTestState) {

0 commit comments

Comments
 (0)