From 0aa99a5f941b886597e7366be763dadc8c6db6dd Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Thu, 4 Jun 2015 11:41:19 +1000 Subject: Clean up a bit of the ShrinkTree stuff, particularly for shrinking --- src/main/java/au/id/zancanaro/javacheck/Generators.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main/java/au/id/zancanaro/javacheck/Generators.java') diff --git a/src/main/java/au/id/zancanaro/javacheck/Generators.java b/src/main/java/au/id/zancanaro/javacheck/Generators.java index e5699ac..9730bac 100644 --- a/src/main/java/au/id/zancanaro/javacheck/Generators.java +++ b/src/main/java/au/id/zancanaro/javacheck/Generators.java @@ -29,7 +29,7 @@ public final class Generators { * removed */ public static Generator noShrink(Generator gen) { - return (random, size) -> ShrinkTree.pure(gen.generate(random, size).getValue()); + return gen.withShrinkStrategy(value -> Iterators.emptyIterator()); } @SafeVarargs @@ -230,7 +230,6 @@ public final class Generators { chars[i++] = c; } return String.valueOf(chars); -// return new String(chars); }); } } -- cgit v1.2.3