Skip to content

Commit

Permalink
test for config parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron1024 committed Mar 11, 2024
1 parent 7739f90 commit 6aad9aa
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
1 change: 0 additions & 1 deletion proptest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
8 changes: 0 additions & 8 deletions proptest/tests/fail/doesnt_impl_arb.rs

This file was deleted.

4 changes: 0 additions & 4 deletions proptest/tests/fail/simple.rs

This file was deleted.

22 changes: 17 additions & 5 deletions proptest/tests/pass/with_params.rs
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit 6aad9aa

Please sign in to comment.