From 2aed2e3d51c85cd8de5f238c0da07481c904a0a0 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 16 Oct 2015 17:01:16 -0400 Subject: [PATCH] Choose from a strictly smaller k. --- prototype/DoubtTests/RangedTerm.swift | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/prototype/DoubtTests/RangedTerm.swift b/prototype/DoubtTests/RangedTerm.swift index bdee3e62d..890034c75 100644 --- a/prototype/DoubtTests/RangedTerm.swift +++ b/prototype/DoubtTests/RangedTerm.swift @@ -78,18 +78,14 @@ extension UnannotatedTerm: Arbitrary { static func arbitrary(k: Int) -> Gen { let symbol: Gen = Gen.choose((0, 15)).fmap { "_\($0)" } let leaf: Gen = symbol.fmap { Term((), .Leaf($0)) } - let indexed: Gen = Gen.sized { n in - Gen.choose((0, n)).bind { n in - sequence((0.. = Gen.choose((0, k)).bind { n in + sequence((0.. = Gen.sized { n in - Gen.choose((0, n)).bind { n in - sequence((0.. = Gen.choose((0, k)).bind { n in + sequence((0..