Expand most kotlinx.serialization tests on JS backend
to enhance and increase test coverage of the plugin.
This commit is contained in:
committed by
Space Team
parent
60080e8bb8
commit
fba2f5ea4e
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
// FILE: a.kt
|
// FILE: a.kt
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
package a
|
package a
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
// IGNORE_BACKEND_K1: JS_IR
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
// IGNORE_BACKEND_K1: JS_IR
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
@@ -17,9 +17,6 @@ open class OpenBody {
|
|||||||
@Serializable
|
@Serializable
|
||||||
abstract class AbstractConstructor(var optional: String = "foo")
|
abstract class AbstractConstructor(var optional: String = "foo")
|
||||||
|
|
||||||
// TODO: test fails for K2 if places of 'color' and 'name' are swapped
|
|
||||||
// because of https://youtrack.jetbrains.com/issue/KT-54792 (KT-20980)
|
|
||||||
// and serialization proto extension is not available in K2.
|
|
||||||
@Serializable
|
@Serializable
|
||||||
open class Vehicle {
|
open class Vehicle {
|
||||||
var color: String? = null
|
var color: String? = null
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
// WITH_STDLIB
|
||||||
|
// TARGET_BACKEND: JS_IR
|
||||||
|
// TARGET_BACKEND: JS_IR_ES6
|
||||||
|
|
||||||
|
// JS vs JVM difference is that we are not able to understand that we have a default value in other module (KT-62523)
|
||||||
|
|
||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package a
|
||||||
|
|
||||||
|
import kotlinx.serialization.*
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
open class OpenBody {
|
||||||
|
var optional: String? = "foo"
|
||||||
|
}
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
abstract class AbstractConstructor(var optional: String = "foo")
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
open class Vehicle {
|
||||||
|
var color: String? = null
|
||||||
|
var name: String? = null
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: app(lib)
|
||||||
|
// FILE: app.kt
|
||||||
|
|
||||||
|
package test
|
||||||
|
|
||||||
|
import a.*
|
||||||
|
import kotlinx.serialization.*
|
||||||
|
import kotlinx.serialization.json.*
|
||||||
|
import kotlin.test.assertEquals
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
class Test1: OpenBody()
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
class Test2: AbstractConstructor()
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
open class Car : Vehicle() {
|
||||||
|
var maxSpeed: Int = 100
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test1() {
|
||||||
|
val string = Json.encodeToString(Test1.serializer(), Test1())
|
||||||
|
assertEquals("{\"optional\":\"foo\"}", string)
|
||||||
|
val reconstructed = Json.decodeFromString(Test1.serializer(), string)
|
||||||
|
assertEquals("foo", reconstructed.optional)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test2() {
|
||||||
|
val string = Json.encodeToString(Test2.serializer(), Test2())
|
||||||
|
assertEquals("{\"optional\":\"foo\"}", string)
|
||||||
|
val reconstructed = Json.decodeFromString(Test2.serializer(), string)
|
||||||
|
assertEquals("foo", reconstructed.optional)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test3() {
|
||||||
|
val json = Json { allowStructuredMapKeys = true; encodeDefaults = true }
|
||||||
|
|
||||||
|
val car = Car()
|
||||||
|
car.maxSpeed = 100
|
||||||
|
car.name = "ford"
|
||||||
|
val s = json.encodeToString(Car.serializer(), car)
|
||||||
|
assertEquals("""{"color":null,"name":"ford","maxSpeed":100}""", s)
|
||||||
|
val restoredCar = json.decodeFromString(Car.serializer(), s)
|
||||||
|
assertEquals(100, restoredCar.maxSpeed)
|
||||||
|
assertEquals("ford", restoredCar.name)
|
||||||
|
assertEquals(null, restoredCar.color)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
try {
|
||||||
|
test1()
|
||||||
|
test2()
|
||||||
|
test3()
|
||||||
|
return "OK"
|
||||||
|
} catch (e: Throwable) {
|
||||||
|
e.printStackTrace()
|
||||||
|
return e.message!!
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
// FILE: a.kt
|
// FILE: a.kt
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
package a
|
package a
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// ISSUE: KT-57626
|
// ISSUE: KT-57626
|
||||||
|
|
||||||
|
|||||||
Vendored
-1
@@ -1,4 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// ISSUE: KT-57626
|
// ISSUE: KT-57626
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
// FILE: a.kt
|
// FILE: a.kt
|
||||||
|
|||||||
-2
@@ -1,5 +1,3 @@
|
|||||||
// TARGET_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|||||||
+132
@@ -25,24 +25,72 @@ public class SerializationFirJsBoxTestGenerated extends AbstractSerializationFir
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/kotlinx-serialization/testData/boxIr"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/kotlinx-serialization/testData/boxIr"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("annotationsOnFile.kt")
|
||||||
|
public void testAnnotationsOnFile() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/annotationsOnFile.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("caching.kt")
|
||||||
|
public void testCaching() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/caching.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("clashBetweenSerializableAndNonSerializableProperty.kt")
|
@TestMetadata("clashBetweenSerializableAndNonSerializableProperty.kt")
|
||||||
public void testClashBetweenSerializableAndNonSerializableProperty() throws Exception {
|
public void testClashBetweenSerializableAndNonSerializableProperty() throws Exception {
|
||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/clashBetweenSerializableAndNonSerializableProperty.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/clashBetweenSerializableAndNonSerializableProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("classSerializerAsObject.kt")
|
||||||
|
public void testClassSerializerAsObject() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/classSerializerAsObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("constValInSerialName.kt")
|
@TestMetadata("constValInSerialName.kt")
|
||||||
public void testConstValInSerialName() throws Exception {
|
public void testConstValInSerialName() throws Exception {
|
||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/constValInSerialName.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/constValInSerialName.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("contextualByDefault.kt")
|
||||||
|
public void testContextualByDefault() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/contextualByDefault.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("contextualFallback.kt")
|
||||||
|
public void testContextualFallback() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/contextualFallback.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("contextualWithTypeParameters.kt")
|
||||||
|
public void testContextualWithTypeParameters() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/contextualWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("delegatedInterface.kt")
|
||||||
|
public void testDelegatedInterface() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("delegatedProperty.kt")
|
@TestMetadata("delegatedProperty.kt")
|
||||||
public void testDelegatedProperty() throws Exception {
|
public void testDelegatedProperty() throws Exception {
|
||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedProperty.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumsAreCached.kt")
|
||||||
|
public void testEnumsAreCached() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/enumsAreCached.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("excludedFromExport.kt")
|
@TestMetadata("excludedFromExport.kt")
|
||||||
public void testExcludedFromExport() throws Exception {
|
public void testExcludedFromExport() throws Exception {
|
||||||
@@ -55,12 +103,78 @@ public class SerializationFirJsBoxTestGenerated extends AbstractSerializationFir
|
|||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/excludedFromFileExport.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/excludedFromFileExport.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("genericBaseClassMultiple.kt")
|
||||||
|
public void testGenericBaseClassMultiple() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/genericBaseClassMultiple.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("genericBaseClassSimple.kt")
|
||||||
|
public void testGenericBaseClassSimple() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/genericBaseClassSimple.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("generics.kt")
|
||||||
|
public void testGenerics() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/generics.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("interfaces.kt")
|
@TestMetadata("interfaces.kt")
|
||||||
public void testInterfaces() throws Exception {
|
public void testInterfaces() throws Exception {
|
||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/interfaces.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/interfaces.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("metaSerializable.kt")
|
||||||
|
public void testMetaSerializable() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/metaSerializable.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multimoduleInheritanceJs.kt")
|
||||||
|
public void testMultimoduleInheritanceJs() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/multimoduleInheritanceJs.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multipleGenericsPolymorphic.kt")
|
||||||
|
public void testMultipleGenericsPolymorphic() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/multipleGenericsPolymorphic.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("sealedClassMultifile.kt")
|
||||||
|
public void testSealedClassMultifile() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/sealedClassMultifile.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("sealedInterfaces.kt")
|
||||||
|
public void testSealedInterfaces() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/sealedInterfaces.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("serializableFromAnotherModule.kt")
|
||||||
|
public void testSerializableFromAnotherModule() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/serializableFromAnotherModule.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("serializableFromAnotherModule_multipleFields.kt")
|
||||||
|
public void testSerializableFromAnotherModule_multipleFields() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/serializableFromAnotherModule_multipleFields.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("serializableOnPropertyType.kt")
|
||||||
|
public void testSerializableOnPropertyType() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/serializableOnPropertyType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("serializerFactory.kt")
|
@TestMetadata("serializerFactory.kt")
|
||||||
public void testSerializerFactory() throws Exception {
|
public void testSerializerFactory() throws Exception {
|
||||||
@@ -72,4 +186,22 @@ public class SerializationFirJsBoxTestGenerated extends AbstractSerializationFir
|
|||||||
public void testSerializerFactoryInUserDefined() throws Exception {
|
public void testSerializerFactoryInUserDefined() throws Exception {
|
||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/serializerFactoryInUserDefined.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/serializerFactoryInUserDefined.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("starProjections.kt")
|
||||||
|
public void testStarProjections() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/starProjections.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("useSerializersChain.kt")
|
||||||
|
public void testUseSerializersChain() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/useSerializersChain.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("userDefinedSerializerInCompanion.kt")
|
||||||
|
public void testUserDefinedSerializerInCompanion() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/userDefinedSerializerInCompanion.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+132
@@ -25,24 +25,72 @@ public class SerializationIrJsBoxTestGenerated extends AbstractSerializationIrJs
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/kotlinx-serialization/testData/boxIr"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/kotlinx-serialization/testData/boxIr"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("annotationsOnFile.kt")
|
||||||
|
public void testAnnotationsOnFile() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/annotationsOnFile.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("caching.kt")
|
||||||
|
public void testCaching() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/caching.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("clashBetweenSerializableAndNonSerializableProperty.kt")
|
@TestMetadata("clashBetweenSerializableAndNonSerializableProperty.kt")
|
||||||
public void testClashBetweenSerializableAndNonSerializableProperty() throws Exception {
|
public void testClashBetweenSerializableAndNonSerializableProperty() throws Exception {
|
||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/clashBetweenSerializableAndNonSerializableProperty.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/clashBetweenSerializableAndNonSerializableProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("classSerializerAsObject.kt")
|
||||||
|
public void testClassSerializerAsObject() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/classSerializerAsObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("constValInSerialName.kt")
|
@TestMetadata("constValInSerialName.kt")
|
||||||
public void testConstValInSerialName() throws Exception {
|
public void testConstValInSerialName() throws Exception {
|
||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/constValInSerialName.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/constValInSerialName.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("contextualByDefault.kt")
|
||||||
|
public void testContextualByDefault() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/contextualByDefault.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("contextualFallback.kt")
|
||||||
|
public void testContextualFallback() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/contextualFallback.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("contextualWithTypeParameters.kt")
|
||||||
|
public void testContextualWithTypeParameters() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/contextualWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("delegatedInterface.kt")
|
||||||
|
public void testDelegatedInterface() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("delegatedProperty.kt")
|
@TestMetadata("delegatedProperty.kt")
|
||||||
public void testDelegatedProperty() throws Exception {
|
public void testDelegatedProperty() throws Exception {
|
||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedProperty.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumsAreCached.kt")
|
||||||
|
public void testEnumsAreCached() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/enumsAreCached.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("excludedFromExport.kt")
|
@TestMetadata("excludedFromExport.kt")
|
||||||
public void testExcludedFromExport() throws Exception {
|
public void testExcludedFromExport() throws Exception {
|
||||||
@@ -55,12 +103,78 @@ public class SerializationIrJsBoxTestGenerated extends AbstractSerializationIrJs
|
|||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/excludedFromFileExport.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/excludedFromFileExport.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("genericBaseClassMultiple.kt")
|
||||||
|
public void testGenericBaseClassMultiple() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/genericBaseClassMultiple.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("genericBaseClassSimple.kt")
|
||||||
|
public void testGenericBaseClassSimple() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/genericBaseClassSimple.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("generics.kt")
|
||||||
|
public void testGenerics() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/generics.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("interfaces.kt")
|
@TestMetadata("interfaces.kt")
|
||||||
public void testInterfaces() throws Exception {
|
public void testInterfaces() throws Exception {
|
||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/interfaces.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/interfaces.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("metaSerializable.kt")
|
||||||
|
public void testMetaSerializable() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/metaSerializable.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multimoduleInheritanceJs.kt")
|
||||||
|
public void testMultimoduleInheritanceJs() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/multimoduleInheritanceJs.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multipleGenericsPolymorphic.kt")
|
||||||
|
public void testMultipleGenericsPolymorphic() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/multipleGenericsPolymorphic.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("sealedClassMultifile.kt")
|
||||||
|
public void testSealedClassMultifile() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/sealedClassMultifile.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("sealedInterfaces.kt")
|
||||||
|
public void testSealedInterfaces() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/sealedInterfaces.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("serializableFromAnotherModule.kt")
|
||||||
|
public void testSerializableFromAnotherModule() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/serializableFromAnotherModule.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("serializableFromAnotherModule_multipleFields.kt")
|
||||||
|
public void testSerializableFromAnotherModule_multipleFields() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/serializableFromAnotherModule_multipleFields.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("serializableOnPropertyType.kt")
|
||||||
|
public void testSerializableOnPropertyType() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/serializableOnPropertyType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("serializerFactory.kt")
|
@TestMetadata("serializerFactory.kt")
|
||||||
public void testSerializerFactory() throws Exception {
|
public void testSerializerFactory() throws Exception {
|
||||||
@@ -72,4 +186,22 @@ public class SerializationIrJsBoxTestGenerated extends AbstractSerializationIrJs
|
|||||||
public void testSerializerFactoryInUserDefined() throws Exception {
|
public void testSerializerFactoryInUserDefined() throws Exception {
|
||||||
runTest("plugins/kotlinx-serialization/testData/boxIr/serializerFactoryInUserDefined.kt");
|
runTest("plugins/kotlinx-serialization/testData/boxIr/serializerFactoryInUserDefined.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("starProjections.kt")
|
||||||
|
public void testStarProjections() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/starProjections.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("useSerializersChain.kt")
|
||||||
|
public void testUseSerializersChain() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/useSerializersChain.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("userDefinedSerializerInCompanion.kt")
|
||||||
|
public void testUserDefinedSerializerInCompanion() throws Exception {
|
||||||
|
runTest("plugins/kotlinx-serialization/testData/boxIr/userDefinedSerializerInCompanion.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user