From a12c7955cc780733268a59d790cc7fb11a35dd82 Mon Sep 17 00:00:00 2001 From: Doug Roper Date: Wed, 9 Mar 2022 00:30:28 -0500 Subject: [PATCH] scala 2.13 support. --- .../test/scala/com/rallyhealth/weepickle/v1/NumberSoup.scala | 2 +- .../test/scala/com/rallyhealth/weepickle/v1/ParserSpec.scala | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/weepickle-tests/src/test/scala/com/rallyhealth/weepickle/v1/NumberSoup.scala b/weepickle-tests/src/test/scala/com/rallyhealth/weepickle/v1/NumberSoup.scala index 02d91ddc..2f3f1aab 100644 --- a/weepickle-tests/src/test/scala/com/rallyhealth/weepickle/v1/NumberSoup.scala +++ b/weepickle-tests/src/test/scala/com/rallyhealth/weepickle/v1/NumberSoup.scala @@ -25,5 +25,5 @@ object NumberSoup { ) Gen.listOf(numberParts).map(_.mkString).map(NumberSoup(_)) } - implicit val arb = Arbitrary(gen) + implicit val arb: Arbitrary[NumberSoup] = Arbitrary(gen) } diff --git a/weepickle-tests/src/test/scala/com/rallyhealth/weepickle/v1/ParserSpec.scala b/weepickle-tests/src/test/scala/com/rallyhealth/weepickle/v1/ParserSpec.scala index 8d9cb39f..70e002df 100644 --- a/weepickle-tests/src/test/scala/com/rallyhealth/weepickle/v1/ParserSpec.scala +++ b/weepickle-tests/src/test/scala/com/rallyhealth/weepickle/v1/ParserSpec.scala @@ -4,7 +4,6 @@ import com.rallyhealth.weejson.v1.CanonicalizeNumsVisitor._ import com.rallyhealth.weejson.v1.jackson.{FromJson, ToJson, ToPrettyJson} import com.rallyhealth.weejson.v1.wee_jsoniter_scala.FromJsoniterScala import com.rallyhealth.weejson.v1.{BufferedValue, GenBufferedValue, Value} -import com.rallyhealth.weepickle.v1.NumberSoup.ValidJsonNum import com.rallyhealth.weepickle.v1.core.{FromInput, NoOpVisitor, Visitor} import org.scalactic.TypeCheckedTripleEquals import org.scalatest.freespec.AnyFreeSpec @@ -36,7 +35,7 @@ abstract class ParserSpec(parse: Array[Byte] => FromInput, depthLimit: Int = 100 "roundtrip example" in testValue(NumDouble(1.3424780377262655E-5)) "deep arr" in testDepth(Arr(_)) "deep obj" in testDepth(b => Obj("k" -> b)) - "number soup" in forAll { soup: NumberSoup => + "number soup" in forAll { (soup: NumberSoup) => whenever(soup.isInvalid) { intercept[Exception] { parse(soup.value.getBytes()).transform(NoOpVisitor)