Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ val scala213Version = "2.13.14"
ThisBuild / scalaVersion := scala213Version
ThisBuild / version := "2.18.0-SNAPSHOT"

ThisBuild / crossScalaVersions := Seq("2.11.12", "2.12.19", scala213Version, "3.3.3")
ThisBuild / crossScalaVersions := Seq("2.11.12", "2.12.19", scala213Version, "3.3.4-RC1")

resolvers ++= Resolver.sonatypeOssRepos("snapshots")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AnyValDeserializerTest extends DeserializerTest {
val expected = BigIntAnyVal(42)
mapper.readValue("""{"underlying":42}""", classOf[BigIntAnyVal]) shouldEqual expected
mapper.readValue("""{"value":42}""", classOf[BigIntAnyValHolder]) shouldEqual BigIntAnyValHolder(expected)
//mapper.readValue("""{"value":{"underlying":42}}""", classOf[BigIntOptionAnyValHolder]) shouldEqual
//BigIntOptionAnyValHolder(Some(expected))
mapper.readValue("""{"value":{"underlying":42}}""", classOf[BigIntOptionAnyValHolder]) shouldEqual
BigIntOptionAnyValHolder(Some(expected))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ object AnyValSerializerTest {

case class BigIntAnyVal(underlying: BigInt) extends AnyVal
case class BigIntAnyValHolder(value: BigIntAnyVal)
case class BigIntOptionAnyValHolder(value: Option[BigIntAnyVal])
}

//see AnyVal2SerializerTest for cases that only work with Scala2 and Scala3.3 but not earlier versions of Scala3
Expand All @@ -26,6 +27,7 @@ class AnyValSerializerTest extends BaseFixture {
val value = BigIntAnyVal(42)
mapper.writeValueAsString(value) shouldBe """{"underlying":42}"""
mapper.writeValueAsString(BigIntAnyValHolder(value)) shouldBe """{"value":42}"""
mapper.writeValueAsString(BigIntOptionAnyValHolder(Some(value))) shouldBe """{"value":{"underlying":42}}"""
}

}