Skip to content

Commit

Permalink
add tests for arrays
Browse files Browse the repository at this point in the history
(cherry picked from commit ac093be)
  • Loading branch information
pjfanning committed Feb 21, 2021
1 parent 1990418 commit 2530964
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -46,9 +46,8 @@ class SeqDeserializerTest extends DeserializerTest {
result should equal (listScala)
}

it should "deserialize a list into a LazyList" in {
import overrides._
val result = deserialize(listJson, classOf[LazyList[Int]])
it should "deserialize a list into a mutable Array" in {
val result = deserialize(listJson, classOf[Array[Int]])
result should equal (listScala)
}

Expand Down
Expand Up @@ -48,6 +48,10 @@ class IterableSerializerTest extends SerializerTest {
serialize(Seq(1, 2, 3)) should be("[1,2,3]")
}

it should "serialize a Array[Int]" in {
serialize(Array(1, 2, 3)) should be("[1,2,3]")
}

it should "serialize an immutable Set[Int]" in {
serialize(immutable.Set(1, 2, 3)) should matchUnorderedSet
}
Expand Down

0 comments on commit 2530964

Please sign in to comment.