8272567: [IR Framework] Make AbstractInfo.getRandom() static
Reviewed-by: thartmann
This commit is contained in:
parent
481c1f0549
commit
79a06df811
@ -56,7 +56,7 @@ abstract public class AbstractInfo {
|
||||
*
|
||||
* @return the random object.
|
||||
*/
|
||||
public Random getRandom() {
|
||||
public static Random getRandom() {
|
||||
return RANDOM;
|
||||
}
|
||||
|
||||
|
@ -103,9 +103,9 @@ public class CustomRunTestExample {
|
||||
|
||||
// This version of @Run passes the RunInfo object as an argument. No other arguments and combiniations are allowed.
|
||||
@Run(test = "test2")
|
||||
public void runWithRunInfo(RunInfo info) {
|
||||
public void runWithRunInfo() {
|
||||
// We could also skip some invocations. This might have an influence on possible @IR rules, need to be careful.
|
||||
if (info.getRandom().nextBoolean()) {
|
||||
if (RunInfo.getRandom().nextBoolean()) {
|
||||
int returnValue = test(34);
|
||||
if (returnValue != 34) {
|
||||
throw new RuntimeException("Must match");
|
||||
|
Loading…
Reference in New Issue
Block a user