Skip to content

Commit 57a9a58

Browse files
committed
Add missing tests for JVM-only collection types
1 parent e54b271 commit 57a9a58

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

jsoniter-scala-macros/jvm/src/test/scala/com/github/plokhotnyuk/jsoniter_scala/macros/JsonCodecMakerJVMSpec.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ class JsonCodecMakerJVMSpec extends VerifyingSpec {
88
import NamespacePollutions._
99

1010
"JsonCodecMaker.make generate codecs which" should {
11+
"serialize and deserialize JVM-only collection types" in {
12+
verifySerDeser(make[_root_.scala.collection.concurrent.TrieMap[String, Int]],
13+
_root_.scala.collection.concurrent.TrieMap[String, Int]("WWW" -> 1, "VVV" -> 2),
14+
"""{"WWW":1,"VVV":2}""")
15+
verifySerDeser(make[_root_.scala.collection.mutable.WeakHashMap[String, Int]],
16+
_root_.scala.collection.mutable.WeakHashMap[String, Int]("WWW" -> 1, "VVV" -> 2),
17+
"""{"WWW":1,"VVV":2}""")
18+
}
1119
"serialize and deserialize recursive structures with an implicit codec using a minimal thread stack" in {
1220
case class Nested(n: Option[Nested] = _root_.scala.None)
1321

0 commit comments

Comments
 (0)