diff --git a/proptest/src/lib.rs b/proptest/src/lib.rs index da9d071c..0db3ee41 100644 --- a/proptest/src/lib.rs +++ b/proptest/src/lib.rs @@ -109,5 +109,4 @@ pub use proptest_macro::property_test; fn compile_tests() { let t = trybuild::TestCases::new(); t.pass("tests/pass/*.rs"); - t.compile_fail("tests/fail/*.rs"); } diff --git a/proptest/tests/fail/doesnt_impl_arb.rs b/proptest/tests/fail/doesnt_impl_arb.rs deleted file mode 100644 index 78817a5c..00000000 --- a/proptest/tests/fail/doesnt_impl_arb.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn main() {} - -#[derive(Debug)] -struct NotArbitrary; - -#[proptest::property_test] -fn my_test(foo: NotArbitrary) {} - diff --git a/proptest/tests/fail/simple.rs b/proptest/tests/fail/simple.rs deleted file mode 100644 index fe51129e..00000000 --- a/proptest/tests/fail/simple.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() {} - -#[cfg(test)] -compile_fail!(); diff --git a/proptest/tests/pass/with_params.rs b/proptest/tests/pass/with_params.rs index 2dc79cfb..c83419c4 100644 --- a/proptest/tests/pass/with_params.rs +++ b/proptest/tests/pass/with_params.rs @@ -1,9 +1,21 @@ fn main() {} -#[proptest::property_test(config = proptest::test_runner::Config { - cases = 10, - ..Default::default() -})] -fn my_test(x: i32) { +#[proptest::property_test( + config = proptest::test_runner::Config { + cases: 10, + ..Default::default() + } +)] +fn no_trailing_comma(x: i32) { + assert_eq!(x, x); +} + +#[proptest::property_test( + config = proptest::test_runner::Config { + cases: 10, + ..Default::default() + } +)] +fn trailing_comma(x: i32) { assert_eq!(x, x); }