about summary refs log tree commit diff
path: root/src/libtest/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-05 07:30:19 +0000
committerbors <bors@rust-lang.org>2018-09-05 07:30:19 +0000
commit3f13b27c2b6a1f83ee08a87c6134c86526edffc0 (patch)
tree851bd551452a99115a72773b871f0d0f1433fcc4 /src/libtest/lib.rs
parent0be2c303692cab31390e52701007cfa87867bf74 (diff)
parent0593dc7e3c9783f1c0bbbc8f017f9e914114e057 (diff)
Auto merge of #53410 - djrenren:custom-test-frameworks, r=alexcrichton
Introduce Custom Test Frameworks

Introduces `#[test_case]` and `#[test_runner]` and re-implements `#[test]` and `#[bench]` in terms of them.

Details found here: https://blog.jrenner.net/rust/testing/2018/08/06/custom-test-framework-prop.html
Diffstat (limited to 'src/libtest/lib.rs')
-rw-r--r--src/libtest/lib.rs3
1 files changed, 2 insertions, 1 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()