8266527: RandomTestCoverage.java failing due to API removal

Reviewed-by: rriggs
This commit is contained in:
Jim Laskey 2021-05-04 21:18:48 +00:00
parent c53dee7480
commit f00b70e2ca

View file

@ -187,25 +187,30 @@ public class RandomTestCoverage {
coverFactory(factory); coverFactory(factory);
coverOf(factory.name()); coverOf(factory.name());
}); });
RandomGeneratorFactory.all(StreamableGenerator.class) RandomGeneratorFactory.all()
.filter(f -> f.isStreamable())
.forEach(factory -> { .forEach(factory -> {
coverStreamable(factory.create()); coverStreamable((StreamableGenerator)factory.create());
}); });
RandomGeneratorFactory.all(SplittableGenerator.class) RandomGeneratorFactory.all()
.filter(f -> f.isSplittable())
.forEach(factory -> { .forEach(factory -> {
coverSplittable(factory.create()); coverSplittable((SplittableGenerator)factory.create());
}); });
RandomGeneratorFactory.all(JumpableGenerator.class) RandomGeneratorFactory.all()
.filter(f -> f.isJumpable())
.forEach(factory -> { .forEach(factory -> {
coverJumpable(factory.create()); coverJumpable((JumpableGenerator)factory.create());
}); });
RandomGeneratorFactory.all(LeapableGenerator.class) RandomGeneratorFactory.all()
.filter(f -> f.isLeapable())
.forEach(factory -> { .forEach(factory -> {
coverLeapable(factory.create()); coverLeapable((LeapableGenerator)factory.create());
}); });
RandomGeneratorFactory.all(ArbitrarilyJumpableGenerator.class) RandomGeneratorFactory.all()
.filter(f -> f.isArbitrarilyJumpable())
.forEach(factory -> { .forEach(factory -> {
coverArbitrarilyJumpable(factory.create()); coverArbitrarilyJumpable((ArbitrarilyJumpableGenerator)factory.create());
}); });
coverRandomGenerator(new SecureRandom()); coverRandomGenerator(new SecureRandom());