diff --git a/src/test/run-pass/termination-trait-in-test.rs b/src/test/run-pass/rfc-1937-termination-trait/termination-trait-in-test.rs similarity index 72% rename from src/test/run-pass/termination-trait-in-test.rs rename to src/test/run-pass/rfc-1937-termination-trait/termination-trait-in-test.rs index e67e0de5c318b..494500d522abe 100644 --- a/src/test/run-pass/termination-trait-in-test.rs +++ b/src/test/run-pass/rfc-1937-termination-trait/termination-trait-in-test.rs @@ -11,8 +11,11 @@ // compile-flags: --test #![feature(termination_trait)] +#![feature(test)] +extern crate test; use std::num::ParseIntError; +use test::Bencher; #[test] fn is_a_num() -> Result<(), ParseIntError> { @@ -26,3 +29,15 @@ fn not_a_num() -> Result<(), ParseIntError> { let _: u32 = "abc".parse()?; Ok(()) } + +#[bench] +fn test_a_positive_bench(_: &mut Bencher) -> Result<(), ParseIntError> { + Ok(()) +} + +#[bench] +#[should_panic] +fn test_a_neg_bench(_: &mut Bencher) -> Result<(), ParseIntError> { + let _: u32 = "abc".parse()?; + Ok(()) +}