diff options
Diffstat (limited to 'src/main/java/au/id/zancanaro/javacheck/junit')
-rw-r--r-- | src/main/java/au/id/zancanaro/javacheck/junit/Properties.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main/java/au/id/zancanaro/javacheck/junit/Properties.java b/src/main/java/au/id/zancanaro/javacheck/junit/Properties.java index a7bf19b..c428edc 100644 --- a/src/main/java/au/id/zancanaro/javacheck/junit/Properties.java +++ b/src/main/java/au/id/zancanaro/javacheck/junit/Properties.java @@ -27,11 +27,6 @@ public class Properties extends BlockJUnit4ClassRunner { } @Override - protected void collectInitializationErrors(List<Throwable> errors) { - super.collectInitializationErrors(errors); - } - - @Override protected void validateConstructor(List<Throwable> errors) { validateOnlyOneConstructor(errors); } @@ -109,7 +104,7 @@ public class Properties extends BlockJUnit4ClassRunner { } catch (AssumptionViolatedException ex) { numTests++; if (assumptionsViolated++ == 50) { - throw new Error("Violated 50 assumptions in a row: failing test"); + throw new Error("Violated 50 assumptions in a row: failing test", ex); } } catch (Throwable ex) { throw new PropertyError(method.getName(), seed, shrink(tree, ex)); @@ -130,9 +125,11 @@ public class Properties extends BlockJUnit4ClassRunner { Iterator<ShrinkTree<List<Object>>> trees = failed.getChildren().iterator(); while (trees.hasNext()) { ShrinkTree<List<Object>> tree = trees.next(); - if (seenArgs.add(Arrays.asList(tree.getValue()))) { + List<Object> value = tree.getValue(); + boolean haveSeen = seenArgs.add(Arrays.asList(value)); + if (haveSeen) { try { - runTest(tree.getValue().toArray()); + runTest(value.toArray()); } catch (AssumptionViolatedException ex) { // ignore, because it's not useful } catch (Throwable ex) { |