From 057a847f302abb7cae696936a101d1f1f7b876f5 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 16 Oct 2015 15:21:27 -0400 Subject: [PATCH] Add a generator for symbols. Right now just _ --- prototype/DoubtTests/RangedTerm.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/prototype/DoubtTests/RangedTerm.swift b/prototype/DoubtTests/RangedTerm.swift index b1309d248..dc1a69f7a 100644 --- a/prototype/DoubtTests/RangedTerm.swift +++ b/prototype/DoubtTests/RangedTerm.swift @@ -76,6 +76,7 @@ struct UnannotatedTerm { extension UnannotatedTerm: Arbitrary { static var arbitrary: Gen { + let symbol: Gen = Gen.choose((0, 15)).fmap { "_\($0)" } let leaf: Gen = String.arbitrary.fmap { Term((), .Leaf($0)) } let indexed: Gen = Gen.sized { n in Gen.choose((0, n)).bind { n in