diff options
author | Carlo Zancanaro <carlo@zancanaro.id.au> | 2015-06-03 14:32:07 +1000 |
---|---|---|
committer | Carlo Zancanaro <carlo@zancanaro.id.au> | 2015-06-03 14:32:07 +1000 |
commit | 7b1a783b749ab04ab8219ef28f9b1abb0ded6ca4 (patch) | |
tree | a0d25f117dbf3af5adab6468e513c0b0c6ec4b34 /src/main/java/au/id/zancanaro/javacheck/junit | |
parent | 7eabc41ad41e0da58fff2a6bb04212ea0cd3baa2 (diff) |
Rename RoseTree to ShrinkTree (less confusing and more specific)
Diffstat (limited to 'src/main/java/au/id/zancanaro/javacheck/junit')
-rw-r--r-- | src/main/java/au/id/zancanaro/javacheck/junit/Properties.java | 12 |
1 files changed, 6 insertions, 6 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 1e3f502..b1cb375 100644 --- a/src/main/java/au/id/zancanaro/javacheck/junit/Properties.java +++ b/src/main/java/au/id/zancanaro/javacheck/junit/Properties.java @@ -1,7 +1,7 @@ package au.id.zancanaro.javacheck.junit; import au.id.zancanaro.javacheck.Generator; -import au.id.zancanaro.javacheck.RoseTree; +import au.id.zancanaro.javacheck.ShrinkTree; import au.id.zancanaro.javacheck.ShrinkResult; import au.id.zancanaro.javacheck.annotations.DataSource; import au.id.zancanaro.javacheck.annotations.Property; @@ -208,7 +208,7 @@ public class Properties extends BlockJUnit4ClassRunner { int numTests = property.runs(); for (int i = 0; i < numTests; ++i) { int size = Math.min(i + 1, maxSize); - RoseTree<Object[]> tree = generator.generate(random, size); + ShrinkTree<Object[]> tree = generator.generate(random, size); try { runTest(tree.getValue()); assumptionsViolated = 0; @@ -225,7 +225,7 @@ public class Properties extends BlockJUnit4ClassRunner { } } - private ShrinkResult shrink(RoseTree<Object[]> failed, Throwable originalEx) { + private ShrinkResult shrink(ShrinkTree<Object[]> failed, Throwable originalEx) { // this array is a mutable container so the shutdown handler can see the new version ShrinkResult[] smallest = new ShrinkResult[]{ new ShrinkResult(failed.getValue(), originalEx)}; @@ -233,10 +233,10 @@ public class Properties extends BlockJUnit4ClassRunner { Thread shutdownHandler = makeShutdownHandler(smallest, originalEx); Runtime.getRuntime().addShutdownHook(shutdownHandler); - Iterator<RoseTree<Object[]>> trees = failed.getChildren(); + Iterator<ShrinkTree<Object[]>> trees = failed.getChildren(); Set<List<Object>> seenArgs = new HashSet<>(); while (trees.hasNext()) { - RoseTree<Object[]> tree = trees.next(); + ShrinkTree<Object[]> tree = trees.next(); if (seenArgs.add(Arrays.asList(tree.getValue()))) { try { runTest(tree.getValue()); @@ -244,7 +244,7 @@ public class Properties extends BlockJUnit4ClassRunner { // ignore, because it's not useful } catch (Throwable ex) { smallest[0] = new ShrinkResult(tree.getValue(), ex); - Iterator<RoseTree<Object[]>> children = tree.getChildren(); + Iterator<ShrinkTree<Object[]>> children = tree.getChildren(); if (children.hasNext()) { trees = children; } else { |