File tree 2 files changed +6
-6
lines changed
book/src/proptest/tutorial
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ limited. Creating such strategies with `prop_compose!` is possible but
5
5
generally is not very readable, so in most cases defining the function by
6
6
hand is preferable.
7
7
8
- The core building block is the [ ` prop_oneof! ` ] ( macro.prop_oneof.html )
8
+ The core building block is the
9
+ [ ` prop_oneof! ` ] ( https://docs.rs/proptest/latest/proptest/macro.prop_oneof.html )
9
10
macro, in which you list one case for each case in your ` enum ` . For ` enum ` s
10
11
which have no data, the strategy for each case is
11
12
` Just(YourEnum::TheCase) ` . Enum cases with data generally require putting
Original file line number Diff line number Diff line change 1
1
# Using the Test Runner
2
2
3
3
Rather than manually shrinking, proptest's
4
- [ ` TestRunner ` ] ( test_runner/struct.TestRunner.html ) provides this
5
- functionality for us and additionally handles things like panics. The
6
- method we're interested in is ` run ` . We simply
7
- give it the strategy and a function to test inputs and it takes care of the
8
- rest.
4
+ [ ` TestRunner ` ] ( https://docs.rs/proptest/latest/proptest/test_runner/struct.TestRunner.html )
5
+ provides this functionality for us and additionally handles things like panics.
6
+ The method we're interested in is ` run ` . We simply give it the strategy and a
7
+ function to test inputs and it takes care of the rest.
9
8
10
9
``` rust
11
10
# extern crate proptest;
You can’t perform that action at this time.
0 commit comments