diff options
Diffstat (limited to 'src/test/scala/spray/json/RoundTripSpecs.scala')
-rw-r--r-- | src/test/scala/spray/json/RoundTripSpecs.scala | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/scala/spray/json/RoundTripSpecs.scala b/src/test/scala/spray/json/RoundTripSpecs.scala index 51df48d..7609a53 100644 --- a/src/test/scala/spray/json/RoundTripSpecs.scala +++ b/src/test/scala/spray/json/RoundTripSpecs.scala @@ -8,9 +8,7 @@ object JsValueGenerators { import Gen._ import Arbitrary.arbitrary - // some characters have special meaning in parboiled - // see org.parboiled.support.Chars, we have to exclude those - val parseableString: Gen[String] = arbitrary[String].map(_.filterNot(_ > 0xfd00)) + val parseableString: Gen[String] = arbitrary[String] val genString: Gen[JsString] = parseableString.map(JsString(_)) val genBoolean: Gen[JsBoolean] = oneOf(JsFalse, JsTrue) val genLongNumber: Gen[JsNumber] = arbitrary[Long].map(JsNumber(_)) @@ -22,7 +20,7 @@ object JsValueGenerators { for { n <- choose(0, 15) els <- Gen.containerOfN[List, JsValue](n, genValue(depth - 1)) - } yield JsArray(els) + } yield JsArray(els.toVector) def genField(depth: Int): Gen[(String, JsValue)] = for { key <- parseableString @@ -34,7 +32,7 @@ object JsValueGenerators { for { n <- choose(0, 15) fields <- Gen.containerOfN[List, (String, JsValue)](n, genField(depth - 1)) - } yield JsObject(fields) + } yield JsObject(fields: _*) def genValue(depth: Int): Gen[JsValue] = oneOf( |