@Seed("deadbeef") @Test @Repeat(iterations = 20)
/** * Get an annotated element's {@link Seed} annotation and determine if it's fixed * or not. If it is fixed, return the seeds. Otherwise return <code>randomSeed</code>. */ private long [] seedFromAnnot(AnnotatedElement element, long randomSeed) { Seed seed = element.getAnnotation(Seed.class); String seedChain = seed.value(); if (seedChain.equals("random")) { return new long [] { randomSeed }; } return SeedUtils.parseSeedChain(seedChain); }
/** * Get an annotated element's {@link Seed} annotation and determine if it's fixed * or not. If it is fixed, return the seeds. Otherwise return <code>randomSeed</code>. */ private long [] seedFromAnnot(AnnotatedElement element, long randomSeed) { Seed seed = element.getAnnotation(Seed.class); String seedChain = seed.value(); if (seedChain.equals("random")) { return new long [] { randomSeed }; } return SeedUtils.parseSeedChain(seedChain); }
@Seed("deadbeef") public static class OrderRandomizedButFixed extends OrderRandomized { }
if (seedsValue != null) { for (Seed s : seedsValue.value()) { if (s.value().equals("random")) seeds.add(randomSeed); else { for (long s2 : SeedUtils.parseSeedChain(s.value())) { seeds.add(s2); if (!seed.value().equals("random")) { long [] seedChain = SeedUtils.parseSeedChain(suiteClass.getAnnotation(Seed.class).value()); if (seedChain.length > 1) seeds.add(seedChain[1]);
@Seed("AF567B2B9F8A8F1C") public class Test005RecoveringRandomSeed extends RandomizedTest { @BeforeClass
if (seedsValue != null) { for (Seed s : seedsValue.value()) { if (s.value().equals("random")) seeds.add(randomSeed); else { for (long s2 : SeedUtils.parseSeedChain(s.value())) { seeds.add(s2); if (!seed.value().equals("random")) { long [] seedChain = SeedUtils.parseSeedChain(suiteClass.getAnnotation(Seed.class).value()); if (seedChain.length > 1) seeds.add(seedChain[1]);
if (seed != null) { try { String seedChain = seed.value(); if (!seedChain.equals("random")) { long[] chain = SeedUtils.parseSeedChain(seedChain);
if (seed != null) { try { String seedChain = seed.value(); if (!seedChain.equals("random")) { long[] chain = SeedUtils.parseSeedChain(seedChain);
@Repeat(iterations = 5, useConstantSeed = true) @Seed("f00ddead") @Test public void repeatFailure() { assertTrue(randomBoolean()); }