You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: book/src/features/structured-testing.md
+44-1
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,50 @@ fn main() {
59
59
}
60
60
```
61
61
62
-
This basic test will make sure we don't panic on any of the list of operations. We can take it to the next step by using a test oracle to make sure the behavior of `MySet` is actually correct. Here we'll use `HashSet` from the `std` library:
62
+
## Controlling The Number Of Operations Generated
63
+
64
+
Using `check!().with_type::<Vec<T>>()` will generate vectors with lengths in the range `0..=64`. If you need more control over the number of elements being generated you can instead use `.with_generator` and provide a customized generator:
The basic test we constructed above will make sure we don't panic on any of the list of operations. We can take it to the next step by using a test oracle to make sure the behavior of `MySet` is actually correct. Here we'll use `HashSet` from the `std` library:
0 commit comments