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: core/commonTest/src/kotlinx/serialization/modules/ModuleBuildersTest.kt
+15-2Lines changed: 15 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -227,8 +227,21 @@ class ModuleBuildersTest {
227
227
subclass(C2::class)
228
228
}
229
229
}
230
-
val classNameMsg =if (currentPlatform ==Platform.JS|| currentPlatform ==Platform.WASM) "class Any"else"class kotlin.Any"
231
-
assertFailsWithMessage<IllegalArgumentException>("Multiple polymorphic serializers in a scope of '$classNameMsg' have the same serial name 'C'") { c1 + c2 }
230
+
val classNameMsg =if (currentPlatform ==Platform.JS) "class Any"else"class kotlin.Any"
231
+
// In WASM the class name may appear as either "class Any" or "class kotlin.Any" due to changing API
232
+
if (currentPlatform ==Platform.WASM) {
233
+
val ex = assertFailsWith<IllegalArgumentException> { c1 + c2 }
234
+
val expected1 ="Multiple polymorphic serializers in a scope of 'class Any' have the same serial name 'C'"
235
+
val expected2 ="Multiple polymorphic serializers in a scope of 'class kotlin.Any' have the same serial name 'C'"
0 commit comments