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: firebase-common/src/commonTest/kotlin/dev/gitlive/firebase/EncodersTest.kt
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -49,12 +49,12 @@ data class GenericClass<T>(
49
49
50
50
@Serializable
51
51
abstractclassAbstractClass {
52
-
abstractvalvalue:String
52
+
abstractvalabstractValue:String
53
53
}
54
54
55
55
@Serializable
56
56
@SerialName("implemented")
57
-
data classImplementedClass(overridevalvalue:String, valotherValue:Boolean) : AbstractClass()
57
+
data classImplementedClass(overridevalabstractValue:String, valotherValue:Boolean) : AbstractClass()
58
58
59
59
@Serializable
60
60
data classNestedClass(
@@ -170,7 +170,7 @@ class EncodersTest {
170
170
serializersModule = module
171
171
}
172
172
173
-
nativeAssertEquals(nativeMapOf("type" to "implemented", "value" to "value", "otherValue" to true), encoded)
173
+
nativeAssertEquals(nativeMapOf("type" to "implemented", "abstractValue" to "value", "otherValue" to true), encoded)
174
174
175
175
val decoded = decode(AbstractClass.serializer(), encoded) {
176
176
serializersModule = module
@@ -197,7 +197,7 @@ class EncodersTest {
197
197
198
198
val testDataEncoded = nativeMapOf("map" to nativeMapOf("key" to "value"), "otherMap" to nativeMapOf(1 to 1), "bool" to true, "nullableBool" to null, "valueClass" to 42)
199
199
val sealedEncoded = nativeMapOf("type" to "test", "value" to "value")
200
-
val abstractEncoded = nativeMapOf("type" to "implemented", "value" to "value", "otherValue" to true)
200
+
val abstractEncoded = nativeMapOf("type" to "implemented", "abstractValue" to "value", "otherValue" to true)
201
201
nativeAssertEquals(
202
202
nativeMapOf(
203
203
"testData" to testDataEncoded,
@@ -321,16 +321,16 @@ class EncodersTest {
321
321
322
322
val reencoded = reencodeTransformation(
323
323
AbstractClass.serializer(),
324
-
nativeMapOf("type" to "implemented", "value" to "value", "otherValue" to true),
324
+
nativeMapOf("type" to "implemented", "abstractValue" to "value", "otherValue" to true),
nativeAssertEquals(nativeMapOf("type" to "implemented", "value" to "new-value", "otherValue" to false), reencoded)
333
+
nativeAssertEquals(nativeMapOf("type" to "implemented", "abstractValue" to "new-value", "otherValue" to false), reencoded)
334
334
}
335
335
336
336
@Test
@@ -360,7 +360,7 @@ class EncodersTest {
360
360
361
361
val testDataEncoded = nativeMapOf("map" to nativeMapOf("key" to "value"), "otherMap" to nativeMapOf(1 to 1), "bool" to true, "nullableBool" to null, "valueClass" to 42)
362
362
val sealedEncoded = nativeMapOf("type" to "test", "value" to "value")
363
-
val abstractEncoded = nativeMapOf("type" to "implemented", "value" to "value", "otherValue" to true)
363
+
val abstractEncoded = nativeMapOf("type" to "implemented", "abstractValue" to "value", "otherValue" to true)
0 commit comments