diff --git a/README.md b/README.md index 5936399..cccd306 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ collections (`List`, `Vector`, `Seq`, `Set`, `Map`). ### scala-cli ```scala -//> using scala 3.9.0-RC4 +//> using scala 3.9.0 //> using dep com.halotukozak::mcodec:: ``` @@ -43,7 +43,7 @@ libraryDependencies += "com.halotukozak" %% "mcodec" % "" ### mill ```scala -def scalaVersion = "3.9.0-RC4" +def scalaVersion = "3.9.0" def mvDeps = Seq(mvn"com.halotukozak::mcodec::") ``` diff --git a/project.scala b/project.scala index 3ff90c6..e56059e 100644 --- a/project.scala +++ b/project.scala @@ -1,6 +1,6 @@ -//> using scala 3.9.0-RC6 +//> using scala 3.9.0 -//> using dep com.halotukozak::made::0.4.0 +//> using dep com.halotukozak::made::0.4.1 //> using test.dep org.scalameta::munit::1.3.5 //> using test.dep org.scalameta::munit-scalacheck::1.3.0 diff --git a/test/mcodec/BsonRoundTripTest.scala b/test/mcodec/BsonRoundTripTest.scala index eb7ee2a..4eda3f3 100644 --- a/test/mcodec/BsonRoundTripTest.scala +++ b/test/mcodec/BsonRoundTripTest.scala @@ -13,6 +13,14 @@ class BsonRoundTripTest extends RoundTrip(BsonBackend): given Arbitrary[Double] = Arbitrary(Arbitrary.arbitrary[Double].suchThat(java.lang.Double.isFinite)) + // BSON field names are cstrings and cannot contain a NUL byte (see BsonOutput.writeCString). + given Arbitrary[Map[String, Int]] = Arbitrary( + Gen.mapOf(for + k <- Arbitrary.arbitrary[String].map(_.filterNot(_ == '\u0000')) + v <- Arbitrary.arbitrary[Int] + yield k -> v), + ) + // FlatShape Arbitrary — copy from FlatDiscriminatorTest (that given is scoped to its own suite). given Arbitrary[FlatShape] = Arbitrary( Gen.oneOf(