Add tests for KFunction involving value classes

See KT-31141.
This commit is contained in:
wrongwrong
2022-02-18 21:11:56 +09:00
committed by Alexander Udalov
parent c8453ec8b4
commit c4735f9f29
54 changed files with 3535 additions and 888 deletions
@@ -30195,18 +30195,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@Test
@TestMetadata("constructorWithInlineClassParameters.kt")
public void testConstructorWithInlineClassParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/constructorWithInlineClassParameters.kt");
}
@Test
@TestMetadata("functionsWithInlineClassParameters.kt")
public void testFunctionsWithInlineClassParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/functionsWithInlineClassParameters.kt");
}
@Test
@TestMetadata("inlineClassConstructor.kt")
public void testInlineClassConstructor() throws Exception {
@@ -30219,40 +30207,40 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/internalPrimaryValOfInlineClass.kt");
}
@Test
@TestMetadata("nonOverridingFunOfInlineClass.kt")
public void testNonOverridingFunOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/nonOverridingFunOfInlineClass.kt");
}
@Test
@TestMetadata("nonOverridingVarOfInlineClass.kt")
public void testNonOverridingVarOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/nonOverridingVarOfInlineClass.kt");
}
@Test
@TestMetadata("overridingFunOfInlineClass.kt")
public void testOverridingFunOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/overridingFunOfInlineClass.kt");
}
@Test
@TestMetadata("overridingVarOfInlineClass.kt")
public void testOverridingVarOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/overridingVarOfInlineClass.kt");
}
@Test
@TestMetadata("primaryValOfInlineClass.kt")
public void testPrimaryValOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/primaryValOfInlineClass.kt");
}
@Test
@TestMetadata("properties.kt")
public void testProperties() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/properties.kt");
@Nested
@TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses/nonNullObject")
@TestDataPath("$PROJECT_ROOT")
public class NonNullObject {
@Test
public void testAllFilesPresentInNonNullObject() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses/nonNullObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses/nullableObject")
@TestDataPath("$PROJECT_ROOT")
public class NullableObject {
@Test
public void testAllFilesPresentInNullableObject() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses/nullableObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses/primitive")
@TestDataPath("$PROJECT_ROOT")
public class Primitive {
@Test
public void testAllFilesPresentInPrimitive() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses/primitive"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
}
}
@@ -30297,18 +30297,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("constructorWithInlineClassParameters.kt")
public void testConstructorWithInlineClassParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/constructorWithInlineClassParameters.kt");
}
@Test
@TestMetadata("functionsWithInlineClassParameters.kt")
public void testFunctionsWithInlineClassParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/functionsWithInlineClassParameters.kt");
}
@Test
@TestMetadata("inlineClassConstructor.kt")
public void testInlineClassConstructor() throws Exception {
@@ -30321,40 +30309,40 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/internalPrimaryValOfInlineClass.kt");
}
@Test
@TestMetadata("nonOverridingFunOfInlineClass.kt")
public void testNonOverridingFunOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/nonOverridingFunOfInlineClass.kt");
}
@Test
@TestMetadata("nonOverridingVarOfInlineClass.kt")
public void testNonOverridingVarOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/nonOverridingVarOfInlineClass.kt");
}
@Test
@TestMetadata("overridingFunOfInlineClass.kt")
public void testOverridingFunOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/overridingFunOfInlineClass.kt");
}
@Test
@TestMetadata("overridingVarOfInlineClass.kt")
public void testOverridingVarOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/overridingVarOfInlineClass.kt");
}
@Test
@TestMetadata("primaryValOfInlineClass.kt")
public void testPrimaryValOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/primaryValOfInlineClass.kt");
}
@Test
@TestMetadata("properties.kt")
public void testProperties() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/properties.kt");
@Nested
@TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses/nonNullObject")
@TestDataPath("$PROJECT_ROOT")
public class NonNullObject {
@Test
public void testAllFilesPresentInNonNullObject() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses/nonNullObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses/nullableObject")
@TestDataPath("$PROJECT_ROOT")
public class NullableObject {
@Test
public void testAllFilesPresentInNullableObject() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses/nullableObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses/primitive")
@TestDataPath("$PROJECT_ROOT")
public class Primitive {
@Test
public void testAllFilesPresentInPrimitive() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses/primitive"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
}
}
}
@@ -25062,16 +25062,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("constructorWithInlineClassParameters.kt")
public void testConstructorWithInlineClassParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/constructorWithInlineClassParameters.kt");
}
@TestMetadata("functionsWithInlineClassParameters.kt")
public void testFunctionsWithInlineClassParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/functionsWithInlineClassParameters.kt");
}
@TestMetadata("inlineClassConstructor.kt")
public void testInlineClassConstructor() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/inlineClassConstructor.kt");
@@ -25082,34 +25072,48 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/internalPrimaryValOfInlineClass.kt");
}
@TestMetadata("nonOverridingFunOfInlineClass.kt")
public void testNonOverridingFunOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/nonOverridingFunOfInlineClass.kt");
}
@TestMetadata("nonOverridingVarOfInlineClass.kt")
public void testNonOverridingVarOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/nonOverridingVarOfInlineClass.kt");
}
@TestMetadata("overridingFunOfInlineClass.kt")
public void testOverridingFunOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/overridingFunOfInlineClass.kt");
}
@TestMetadata("overridingVarOfInlineClass.kt")
public void testOverridingVarOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/overridingVarOfInlineClass.kt");
}
@TestMetadata("primaryValOfInlineClass.kt")
public void testPrimaryValOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/primaryValOfInlineClass.kt");
}
@TestMetadata("properties.kt")
public void testProperties() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/properties.kt");
@TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses/nonNullObject")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class NonNullObject extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInNonNullObject() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses/nonNullObject"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
}
@TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses/nullableObject")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class NullableObject extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInNullableObject() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses/nullableObject"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
}
@TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses/primitive")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Primitive extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInPrimitive() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses/primitive"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
}
}
}