diff --git a/tests/src/test/scala/org/json4s/native/MapSerializationExamples.scala b/tests/src/test/scala/org/json4s/native/MapSerializationExamples.scala index 6c64d7d8c..0d6d881c9 100644 --- a/tests/src/test/scala/org/json4s/native/MapSerializationExamples.scala +++ b/tests/src/test/scala/org/json4s/native/MapSerializationExamples.scala @@ -48,9 +48,7 @@ class MapSerializationExamples extends Specification { "Map with Timestamp key" in { val t2013 = new Timestamp(1356998400) val t2014 = new Timestamp(1388534400) - // TODO use Map.apply instead of "new Map.Map2" when 2.13.0-M5 released - // https://github.com/scala/scala/commit/6a570b6f1f59222cae4f55aa25d48e3d4c22ea59 - val pw: Map[Timestamp, String] = new Map.Map2(t2013, "hello", t2014, "world") + val pw: Map[Timestamp, String] = Map(t2013 -> "hello", t2014 -> "world") val ser = swrite(pw) val f2013 = formats.dateFormat.format(t2013) @@ -80,9 +78,7 @@ class MapSerializationExamples extends Specification { } "case class with custom map" in { - // TODO use Map.apply instead of "new Map.Map2" when 2.13.0-M5 released - // https://github.com/scala/scala/commit/6a570b6f1f59222cae4f55aa25d48e3d4c22ea59 - val pw = PlayerWithCustomMap("zortan", new Map.Map2("2013", "zortan13", "2014", "zortan14")) + val pw = PlayerWithCustomMap("zortan", Map("2013" -> "zortan13", "2014" -> "zortan14")) val ser = swrite(pw) val s: String = """{"name":"zortan","aliasByYear":{"2013":"zortan13","2014":"zortan14"}}""" ser must_== s diff --git a/tests/src/test/scala/org/json4s/native/SerializationExamples.scala b/tests/src/test/scala/org/json4s/native/SerializationExamples.scala index 8c0fc6497..d44d752d6 100644 --- a/tests/src/test/scala/org/json4s/native/SerializationExamples.scala +++ b/tests/src/test/scala/org/json4s/native/SerializationExamples.scala @@ -170,9 +170,7 @@ object SerializationExamples extends Specification { } "Generic Map with simple values example" in { - // TODO use Map.apply instead of "new Map.Map2" when 2.13.0-M5 released - // https://github.com/scala/scala/commit/6a570b6f1f59222cae4f55aa25d48e3d4c22ea59 - val pw = PlayerWithGenericMap("zortan", new Map.Map2("1", "asd", "a", 3)) + val pw = PlayerWithGenericMap("zortan", Map("1" -> "asd", "a" -> 3)) val ser = swrite(pw) ser must_== """{"name":"zortan","infomap":{"1":"asd","a":3}}""" read[PlayerWithGenericMap](ser) must_== pw @@ -180,9 +178,7 @@ object SerializationExamples extends Specification { "Generic Map with case class and type hint example" in { implicit val formats = native.Serialization.formats(ShortTypeHints(List(classOf[Player]))) - // TODO use Map.apply instead of "new Map.Map3" when 2.13.0-M5 released - // https://github.com/scala/scala/commit/6a570b6f1f59222cae4f55aa25d48e3d4c22ea59 - val pw = PlayerWithGenericMap("zortan", new Map.Map3("1", "asd", "a", 3, "friend", Player("joe"))) + val pw = PlayerWithGenericMap("zortan", Map("1" -> "asd", "a" -> 3, "friend" -> Player("joe"))) val ser = swrite(pw) ser must_== """{"name":"zortan","infomap":{"1":"asd","a":3,"friend":{"jsonClass":"Player","name":"joe"}}}""" read[PlayerWithGenericMap](ser) must_== pw