Skip to content

Commit

Permalink
Don't export the 'leaf' generator hack
Browse files Browse the repository at this point in the history
  • Loading branch information
bmjames committed Nov 13, 2013
1 parent 09f38fa commit 183e5ca
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -10,7 +10,7 @@ class ArbitraryInstances[J](implicit J: JsonLike[J]) {

// FIXME to avoid a SOE from generator recursion, arrays won't contain objects
// FIXME also, making these lists much longer causes a SOE
def leaf: Gen[J] = Gen.oneOf(string, int, double, bool)
private def leaf: Gen[J] = Gen.oneOf(string, int, double, bool)
def array: Gen[J] = Gen.listOfN(5, leaf).map(J.array(_))

val obj: Gen[J] = Gen.listOfN(5, arbitrary[(String, J)]).map(J.obj(_))
Expand Down

0 comments on commit 183e5ca

Please sign in to comment.