We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 659397d commit d01199dCopy full SHA for d01199d
1 file changed
randomizedtesting-jupiter/src/main/java/com/carrotsearch/randomizedtesting/jupiter/generators/RandomChoices.java
@@ -0,0 +1,11 @@
1
+package com.carrotsearch.randomizedtesting.jupiter.generators;
2
+
3
+import java.util.Random;
4
5
+/** Random selections of objects. */
6
+public final class RandomChoices {
7
+ /** Returns {@code true} rarely (~10% of calls). */
8
+ public static boolean rarely(Random r) {
9
+ return r.nextInt(100) >= 90;
10
+ }
11
+}
0 commit comments