File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/main/scala/org/scalacheck Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,12 @@ sealed abstract class Gen[+T] extends Serializable { self =>
9393 * test property is side-effect free, eg it should not use external vars. */
9494 def filter (p : T => Boolean ): Gen [T ] = suchThat(p)
9595
96+ /** Create a new generator that uses this generator to produce a value
97+ * that doesn't fulfill the given condition. If the condition is fulfilled,
98+ * the generator fails (returns None). Also, make sure that the provided
99+ * test property is side-effect free, eg it should not use external vars. */
100+ def filterNot (p : T => Boolean ): Gen [T ] = suchThat(x => ! p(x))
101+
96102 /** Create a new generator that fails if the specified partial function
97103 * is undefined for this generator's value, otherwise returns the result
98104 * of the partial function applied to this generator's value. */
You can’t perform that action at this time.
0 commit comments