You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: formats/properties/commonTest/src/kotlinx/serialization/properties/SealedClassSerializationFromPropertiesTest.kt
+68Lines changed: 68 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
packagekotlinx.serialization.properties
2
2
3
+
importkotlin.reflect.KProperty1
3
4
importkotlinx.serialization.SerialName
4
5
importkotlinx.serialization.Serializable
5
6
importkotlin.test.Test
@@ -21,6 +22,9 @@ class SealedClassSerializationFromPropertiesTest {
21
22
@Serializable
22
23
data classSecondChild(overridevalfirstProperty:Long, overridevalsecondProperty:String) : BaseClass()
23
24
25
+
@Serializable
26
+
data classCompositeClass(valitem:BaseClass)
27
+
24
28
@Test
25
29
funtestPropertiesDeserialization() {
26
30
val props =mapOf(
@@ -44,7 +48,71 @@ class SealedClassSerializationFromPropertiesTest {
44
48
45
49
val instanceProperties =Properties.encodeToMap(instance)
0 commit comments