From 7b1a783b749ab04ab8219ef28f9b1abb0ded6ca4 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Wed, 3 Jun 2015 14:32:07 +1000 Subject: Rename RoseTree to ShrinkTree (less confusing and more specific) --- .../java/au/id/zancanaro/javacheck/junit/Properties.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/au/id/zancanaro/javacheck/junit') 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 tree = generator.generate(random, size); + ShrinkTree tree = generator.generate(random, size); try { runTest(tree.getValue()); assumptionsViolated = 0; @@ -225,7 +225,7 @@ public class Properties extends BlockJUnit4ClassRunner { } } - private ShrinkResult shrink(RoseTree failed, Throwable originalEx) { + private ShrinkResult shrink(ShrinkTree 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> trees = failed.getChildren(); + Iterator> trees = failed.getChildren(); Set> seenArgs = new HashSet<>(); while (trees.hasNext()) { - RoseTree tree = trees.next(); + ShrinkTree 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> children = tree.getChildren(); + Iterator> children = tree.getChildren(); if (children.hasNext()) { trees = children; } else { -- cgit v1.2.3