diff options
| author | John Renner <john@jrenner.net> | 2018-07-20 18:04:02 -0700 |
|---|---|---|
| committer | John Renner <john@jrenner.net> | 2018-09-04 22:33:00 -0700 |
| commit | 9b27de41d4e00cb6c23df270572472fd4c6f47f8 (patch) | |
| tree | 9f51c7baf3dd1fe2b1d021007b36aa70fb36689d /src/libtest | |
| parent | 0be2c303692cab31390e52701007cfa87867bf74 (diff) | |
| download | rust-9b27de41d4e00cb6c23df270572472fd4c6f47f8.tar.gz rust-9b27de41d4e00cb6c23df270572472fd4c6f47f8.zip | |
Introduce Custom Test Frameworks
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 3 | ||||
| -rw-r--r-- | src/libtest/stats.rs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index d993c6244fc..bf3cb7c537b 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -41,6 +41,7 @@ #![feature(panic_unwind)] #![feature(staged_api)] #![feature(termination_trait_lib)] +#![feature(test)] extern crate getopts; #[cfg(any(unix, target_os = "cloudabi"))] @@ -302,7 +303,7 @@ pub fn test_main(args: &[String], tests: Vec<TestDescAndFn>, options: Options) { // a Vec<TestDescAndFn> is used in order to effect ownership-transfer // semantics into parallel test runners, which in turn requires a Vec<> // rather than a &[]. -pub fn test_main_static(tests: &[TestDescAndFn]) { +pub fn test_main_static(tests: &[&TestDescAndFn]) { let args = env::args().collect::<Vec<_>>(); let owned_tests = tests .iter() diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs index ddb5dcf2a1c..9a8749712c3 100644 --- a/src/libtest/stats.rs +++ b/src/libtest/stats.rs @@ -907,7 +907,8 @@ mod tests { #[cfg(test)] mod bench { - use Bencher; + extern crate test; + use self::test::Bencher; use stats::Stats; #[bench] |
