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:
Ilya Gorbunov
2015-05-15 19:51:30 +03:00
parent edc471c8ec
commit ebe578dbc5
3 changed files with 161 additions and 0 deletions
@@ -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)
}