forked from rust-lang/regex
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a quickcheck property to better test the positive case
If you just generate two random strings, the odds are very high that the shorter one won't be a substring of the longer one once they reach any substantial length. This means that the existing quickcheck cases were probably just testing the negative cases. The exception would be the two cases that append the needle to the haystack, but those only test behavior at the ends. This patch adds a better quickcheck case that can test a needle anywhere in the haystack. See the comments on rust-lang#446
- Loading branch information
Ethan Pailes
committed
Mar 7, 2018
1 parent
7f020b8
commit 24ffdb4
Showing
1 changed file
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters