Tests to ensure the behavior of the specialized empty List, Set, Map implementations is same as of non-specialized ones.
This commit is contained in:
@@ -151,6 +151,7 @@ class CollectionJVMTest {
|
||||
|
||||
test fun emptySetIsSerializable() = testSingletonSerialization(emptySet<Any>())
|
||||
|
||||
test fun emptyMapIsSerializable() = testSingletonSerialization(emptyMap<Any, Any>())
|
||||
|
||||
private fun testSingletonSerialization(value: Any) {
|
||||
val outputStream = ByteArrayOutputStream()
|
||||
@@ -168,3 +169,8 @@ class CollectionJVMTest {
|
||||
assertTrue(value === result)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public fun assertTypeEquals(expected: Any?, actual: Any?) {
|
||||
assertEquals(expected?.javaClass, actual?.javaClass)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user