From edc648813d900a3b0532a67bbe15d146b80831eb Mon Sep 17 00:00:00 2001 From: Mikhael Bogdanov Date: Tue, 16 Oct 2018 11:13:45 +0200 Subject: [PATCH] Regenerate box tests --- ...BlackBoxWithJava8CodegenTestGenerated.java | 803 ------------------ .../generators/tests/GenerateJava8Tests.kt | 5 - .../codegen/BlackBoxCodegenTestGenerated.java | 703 +++++++++++++++ .../LightAnalysisModeTestGenerated.java | 703 +++++++++++++++ .../ir/IrBlackBoxCodegenTestGenerated.java | 703 +++++++++++++++ .../IrJsCodegenBoxTestGenerated.java | 143 ++++ .../semantics/JsCodegenBoxTestGenerated.java | 143 ++++ 7 files changed, 2395 insertions(+), 808 deletions(-) delete mode 100644 compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java deleted file mode 100644 index f56e0f3c6d0..00000000000 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java +++ /dev/null @@ -1,803 +0,0 @@ -/* - * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.codegen; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/codegen/java8/box") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { - KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInBox() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("asyncException.kt") - public void testAsyncException_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/java8/box/asyncException.kt", "kotlin.coroutines.experimental"); - } - - @TestMetadata("asyncException.kt") - public void testAsyncException_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/java8/box/asyncException.kt", "kotlin.coroutines"); - } - - @TestMetadata("async.kt") - public void testAsync_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/java8/box/async.kt", "kotlin.coroutines.experimental"); - } - - @TestMetadata("async.kt") - public void testAsync_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/java8/box/async.kt", "kotlin.coroutines"); - } - - @TestMetadata("capturedSuperCall.kt") - public void testCapturedSuperCall() throws Exception { - runTest("compiler/testData/codegen/java8/box/capturedSuperCall.kt"); - } - - @TestMetadata("defaultMethodCallFromInterface.kt") - public void testDefaultMethodCallFromInterface() throws Exception { - runTest("compiler/testData/codegen/java8/box/defaultMethodCallFromInterface.kt"); - } - - @TestMetadata("defaultMethodCallViaClass.kt") - public void testDefaultMethodCallViaClass() throws Exception { - runTest("compiler/testData/codegen/java8/box/defaultMethodCallViaClass.kt"); - } - - @TestMetadata("defaultMethodCallViaInterface.kt") - public void testDefaultMethodCallViaInterface() throws Exception { - runTest("compiler/testData/codegen/java8/box/defaultMethodCallViaInterface.kt"); - } - - @TestMetadata("defaultMethodOverride.kt") - public void testDefaultMethodOverride() throws Exception { - runTest("compiler/testData/codegen/java8/box/defaultMethodOverride.kt"); - } - - @TestMetadata("dontDelegateToDefaultMethods.kt") - public void testDontDelegateToDefaultMethods() throws Exception { - runTest("compiler/testData/codegen/java8/box/dontDelegateToDefaultMethods.kt"); - } - - @TestMetadata("functionAssertion.kt") - public void testFunctionAssertion() throws Exception { - runTest("compiler/testData/codegen/java8/box/functionAssertion.kt"); - } - - @TestMetadata("inheritKotlin.kt") - public void testInheritKotlin() throws Exception { - runTest("compiler/testData/codegen/java8/box/inheritKotlin.kt"); - } - - @TestMetadata("invokeDefaultViaSuper.kt") - public void testInvokeDefaultViaSuper() throws Exception { - runTest("compiler/testData/codegen/java8/box/invokeDefaultViaSuper.kt"); - } - - @TestMetadata("invokeDefaultViaSuper_16.kt") - public void testInvokeDefaultViaSuper_16() throws Exception { - runTest("compiler/testData/codegen/java8/box/invokeDefaultViaSuper_16.kt"); - } - - @TestMetadata("longChainOfKotlinExtendsFromJavaWithDefault.kt") - public void testLongChainOfKotlinExtendsFromJavaWithDefault() throws Exception { - runTest("compiler/testData/codegen/java8/box/longChainOfKotlinExtendsFromJavaWithDefault.kt"); - } - - @TestMetadata("removeIf.kt") - public void testRemoveIf() throws Exception { - runTest("compiler/testData/codegen/java8/box/removeIf.kt"); - } - - @TestMetadata("samOnInterfaceWithDefaultMethod.kt") - public void testSamOnInterfaceWithDefaultMethod() throws Exception { - runTest("compiler/testData/codegen/java8/box/samOnInterfaceWithDefaultMethod.kt"); - } - - @TestMetadata("stream.kt") - public void testStream() throws Exception { - runTest("compiler/testData/codegen/java8/box/stream.kt"); - } - - @TestMetadata("streamBackwardCompatibility.kt") - public void testStreamBackwardCompatibility() throws Exception { - runTest("compiler/testData/codegen/java8/box/streamBackwardCompatibility.kt"); - } - - @TestMetadata("useStream.kt") - public void testUseStream() throws Exception { - runTest("compiler/testData/codegen/java8/box/useStream.kt"); - } - - @TestMetadata("compiler/testData/codegen/java8/box/annotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Annotations extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInAnnotations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("useTypeParameterAnnotationFromJava.kt") - public void testUseTypeParameterAnnotationFromJava() throws Exception { - runTest("compiler/testData/codegen/java8/box/annotations/useTypeParameterAnnotationFromJava.kt"); - } - - @TestMetadata("useTypeUseAnnotationFromJava.kt") - public void testUseTypeUseAnnotationFromJava() throws Exception { - runTest("compiler/testData/codegen/java8/box/annotations/useTypeUseAnnotationFromJava.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/builtinStubMethods") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class BuiltinStubMethods extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInBuiltinStubMethods() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/builtinStubMethods"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("immutableRemove.kt") - public void testImmutableRemove() throws Exception { - runTest("compiler/testData/codegen/java8/box/builtinStubMethods/immutableRemove.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/delegationBy") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegationBy extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInDelegationBy() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/delegationBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("byMiddleInterface.kt") - public void testByMiddleInterface() throws Exception { - runTest("compiler/testData/codegen/java8/box/delegationBy/byMiddleInterface.kt"); - } - - @TestMetadata("defaultOverride.kt") - public void testDefaultOverride() throws Exception { - runTest("compiler/testData/codegen/java8/box/delegationBy/defaultOverride.kt"); - } - - @TestMetadata("delegationToMap.kt") - public void testDelegationToMap() throws Exception { - runTest("compiler/testData/codegen/java8/box/delegationBy/delegationToMap.kt"); - } - - @TestMetadata("diamond.kt") - public void testDiamond() throws Exception { - runTest("compiler/testData/codegen/java8/box/delegationBy/diamond.kt"); - } - - @TestMetadata("diamond2.kt") - public void testDiamond2() throws Exception { - runTest("compiler/testData/codegen/java8/box/delegationBy/diamond2.kt"); - } - - @TestMetadata("inClassDeclaration.kt") - public void testInClassDeclaration() throws Exception { - runTest("compiler/testData/codegen/java8/box/delegationBy/inClassDeclaration.kt"); - } - - @TestMetadata("mixed.kt") - public void testMixed() throws Exception { - runTest("compiler/testData/codegen/java8/box/delegationBy/mixed.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/codegen/java8/box/delegationBy/simple.kt"); - } - - @TestMetadata("simple1.0.kt") - public void testSimple1_0() throws Exception { - runTest("compiler/testData/codegen/java8/box/delegationBy/simple1.0.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/jvm8") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jvm8 extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInJvm8() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("bridgeInClass.kt") - public void testBridgeInClass() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/bridgeInClass.kt"); - } - - @TestMetadata("bridgeInInterface.kt") - public void testBridgeInInterface() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/bridgeInInterface.kt"); - } - - @TestMetadata("capturedSuperCall.kt") - public void testCapturedSuperCall() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/capturedSuperCall.kt"); - } - - @TestMetadata("defaultArgs.kt") - public void testDefaultArgs() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaultArgs.kt"); - } - - @TestMetadata("inlineFromAnotherFile.kt") - public void testInlineFromAnotherFile() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/inlineFromAnotherFile.kt"); - } - - @TestMetadata("inlineFromStdlib.kt") - public void testInlineFromStdlib() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/inlineFromStdlib.kt"); - } - - @TestMetadata("kt11969.kt") - public void testKt11969() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/kt11969.kt"); - } - - @TestMetadata("kt14243.kt") - public void testKt14243() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/kt14243.kt"); - } - - @TestMetadata("kt14243_2.kt") - public void testKt14243_2() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/kt14243_2.kt"); - } - - @TestMetadata("kt14243_prop.kt") - public void testKt14243_prop() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/kt14243_prop.kt"); - } - - @TestMetadata("kt16581.kt") - public void testKt16581() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/kt16581.kt"); - } - - @TestMetadata("kt16581_2.kt") - public void testKt16581_2() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/kt16581_2.kt"); - } - - @TestMetadata("kt16588.kt") - public void testKt16588() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/kt16588.kt"); - } - - @TestMetadata("kt6301.kt") - public void testKt6301() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/kt6301.kt"); - } - - @TestMetadata("kt6301_2.kt") - public void testKt6301_2() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/kt6301_2.kt"); - } - - @TestMetadata("oneImplementation.kt") - public void testOneImplementation() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/oneImplementation.kt"); - } - - @TestMetadata("oneImplementation2.kt") - public void testOneImplementation2() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/oneImplementation2.kt"); - } - - @TestMetadata("simpleCall.kt") - public void testSimpleCall() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/simpleCall.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/simpleProperty.kt"); - } - - @TestMetadata("compiler/testData/codegen/java8/box/jvm8/defaults") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Defaults extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("accessor.kt") - public void testAccessor() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/accessor.kt"); - } - - @TestMetadata("accessorFromCompanion.kt") - public void testAccessorFromCompanion() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/accessorFromCompanion.kt"); - } - - @TestMetadata("accessorsFromDefaultImpls.kt") - public void testAccessorsFromDefaultImpls() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/accessorsFromDefaultImpls.kt"); - } - - public void testAllFilesPresentInDefaults() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("bridgeInClass.kt") - public void testBridgeInClass() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInClass.kt"); - } - - @TestMetadata("bridgeInInterface.kt") - public void testBridgeInInterface() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterface.kt"); - } - - @TestMetadata("bridgeInInterface2.kt") - public void testBridgeInInterface2() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterface2.kt"); - } - - @TestMetadata("bridgeInInterfaceWithProperties.kt") - public void testBridgeInInterfaceWithProperties() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterfaceWithProperties.kt"); - } - - @TestMetadata("bridgeInInterfaceWithProperties2.kt") - public void testBridgeInInterfaceWithProperties2() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterfaceWithProperties2.kt"); - } - - @TestMetadata("bridgeWithJava.kt") - public void testBridgeWithJava() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeWithJava.kt"); - } - - @TestMetadata("callableReference.kt") - public void testCallableReference() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/callableReference.kt"); - } - - @TestMetadata("capturedSuperCall.kt") - public void testCapturedSuperCall() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/capturedSuperCall.kt"); - } - - @TestMetadata("defaultArgs.kt") - public void testDefaultArgs() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/defaultArgs.kt"); - } - - @TestMetadata("diamond.kt") - public void testDiamond() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/diamond.kt"); - } - - @TestMetadata("inline.kt") - public void testInline() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/inline.kt"); - } - - @TestMetadata("inlineProperty.kt") - public void testInlineProperty() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/inlineProperty.kt"); - } - - @TestMetadata("kt11969.kt") - public void testKt11969() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/kt11969.kt"); - } - - @TestMetadata("kt14243.kt") - public void testKt14243() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/kt14243.kt"); - } - - @TestMetadata("kt14243_2.kt") - public void testKt14243_2() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/kt14243_2.kt"); - } - - @TestMetadata("kt14243_prop.kt") - public void testKt14243_prop() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/kt14243_prop.kt"); - } - - @TestMetadata("oneImplementation.kt") - public void testOneImplementation() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/oneImplementation.kt"); - } - - @TestMetadata("oneImplementation2.kt") - public void testOneImplementation2() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/oneImplementation2.kt"); - } - - @TestMetadata("privateDefaultFromDefaultImpl.kt") - public void testPrivateDefaultFromDefaultImpl() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/privateDefaultFromDefaultImpl.kt"); - } - - @TestMetadata("privateInDefaultImpls.kt") - public void testPrivateInDefaultImpls() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/privateInDefaultImpls.kt"); - } - - @TestMetadata("simpleCall.kt") - public void testSimpleCall() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/simpleCall.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/simpleProperty.kt"); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/superCall.kt"); - } - - @TestMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Compatibility extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInCompatibility() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("bridge.kt") - public void testBridge() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/bridge.kt"); - } - - @TestMetadata("bridge2.kt") - public void testBridge2() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/bridge2.kt"); - } - - @TestMetadata("bridge3.kt") - public void testBridge3() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/bridge3.kt"); - } - - @TestMetadata("bridgeWithProperties.kt") - public void testBridgeWithProperties() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/bridgeWithProperties.kt"); - } - - @TestMetadata("bridgeWithProperties2.kt") - public void testBridgeWithProperties2() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/bridgeWithProperties2.kt"); - } - - @TestMetadata("bridgeWithProperties3.kt") - public void testBridgeWithProperties3() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/bridgeWithProperties3.kt"); - } - - @TestMetadata("defaultArgs.kt") - public void testDefaultArgs() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/defaultArgs.kt"); - } - - @TestMetadata("inheritedJvmDefault.kt") - public void testInheritedJvmDefault() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/inheritedJvmDefault.kt"); - } - - @TestMetadata("propertyAnnotation.kt") - public void testPropertyAnnotation() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/propertyAnnotation.kt"); - } - - @TestMetadata("simpleFunction.kt") - public void testSimpleFunction() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/simpleFunction.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/delegationBy") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegationBy extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInDelegationBy() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/defaults/delegationBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/delegationBy/simple.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/delegationBy/simpleProperty.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NoDelegation extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInNoDelegation() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("noDelegationToDefaultMethodInClass.kt") - public void testNoDelegationToDefaultMethodInClass() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInClass.kt"); - } - - @TestMetadata("noDelegationToDefaultMethodInInterface.kt") - public void testNoDelegationToDefaultMethodInInterface() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface.kt"); - } - - @TestMetadata("noDelegationToDefaultMethodInInterface2.kt") - public void testNoDelegationToDefaultMethodInInterface2() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface2.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/reflection") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reflection extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInReflection() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/defaults/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("propertyAnnotations.kt") - public void testPropertyAnnotations() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/defaults/reflection/propertyAnnotations.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/jvm8/interfaceFlag") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InterfaceFlag extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInInterfaceFlag() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/interfaceFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/interfaceFlag/superCall.kt"); - } - - @TestMetadata("superCallIndirect.kt") - public void testSuperCallIndirect() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/interfaceFlag/superCallIndirect.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/jvm8/optimizations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Optimizations extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInOptimizations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("hashCode.kt") - public void testHashCode() throws Exception { - runTest("compiler/testData/codegen/java8/box/jvm8/optimizations/hashCode.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/mapGetOrDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MapGetOrDefault extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInMapGetOrDefault() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/mapGetOrDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("noTypeSafeBridge.kt") - public void testNoTypeSafeBridge() throws Exception { - runTest("compiler/testData/codegen/java8/box/mapGetOrDefault/noTypeSafeBridge.kt"); - } - - @TestMetadata("typeSafeBridge.kt") - public void testTypeSafeBridge() throws Exception { - runTest("compiler/testData/codegen/java8/box/mapGetOrDefault/typeSafeBridge.kt"); - } - - @TestMetadata("typeSafeBridgeNotNullAny.kt") - public void testTypeSafeBridgeNotNullAny() throws Exception { - runTest("compiler/testData/codegen/java8/box/mapGetOrDefault/typeSafeBridgeNotNullAny.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/mapRemove") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MapRemove extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInMapRemove() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/mapRemove"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("noDefaultImpls.kt") - public void testNoDefaultImpls() throws Exception { - runTest("compiler/testData/codegen/java8/box/mapRemove/noDefaultImpls.kt"); - } - - @TestMetadata("readOnlyMap.kt") - public void testReadOnlyMap() throws Exception { - runTest("compiler/testData/codegen/java8/box/mapRemove/readOnlyMap.kt"); - } - - @TestMetadata("typeSafeBridge.kt") - public void testTypeSafeBridge() throws Exception { - runTest("compiler/testData/codegen/java8/box/mapRemove/typeSafeBridge.kt"); - } - - @TestMetadata("typeSafeBridgeNotNullAny.kt") - public void testTypeSafeBridgeNotNullAny() throws Exception { - runTest("compiler/testData/codegen/java8/box/mapRemove/typeSafeBridgeNotNullAny.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/parametersMetadata") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ParametersMetadata extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInParametersMetadata() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/parametersMetadata"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("defaultImpls.kt") - public void testDefaultImpls() throws Exception { - runTest("compiler/testData/codegen/java8/box/parametersMetadata/defaultImpls.kt"); - } - - @TestMetadata("delegation.kt") - public void testDelegation() throws Exception { - runTest("compiler/testData/codegen/java8/box/parametersMetadata/delegation.kt"); - } - - @TestMetadata("enum.kt") - public void testEnum() throws Exception { - runTest("compiler/testData/codegen/java8/box/parametersMetadata/enum.kt"); - } - - @TestMetadata("extensionFunction.kt") - public void testExtensionFunction() throws Exception { - runTest("compiler/testData/codegen/java8/box/parametersMetadata/extensionFunction.kt"); - } - - @TestMetadata("function.kt") - public void testFunction() throws Exception { - runTest("compiler/testData/codegen/java8/box/parametersMetadata/function.kt"); - } - - @TestMetadata("innerClass.kt") - public void testInnerClass() throws Exception { - runTest("compiler/testData/codegen/java8/box/parametersMetadata/innerClass.kt"); - } - - @TestMetadata("superParams.kt") - public void testSuperParams() throws Exception { - runTest("compiler/testData/codegen/java8/box/parametersMetadata/superParams.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/java8/box/reflection") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reflection extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInReflection() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/testData/codegen/java8/box/reflection/parameters") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Parameters extends AbstractBlackBoxCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInParameters() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/reflection/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("realParameterNames.kt") - public void testRealParameterNames() throws Exception { - runTest("compiler/testData/codegen/java8/box/reflection/parameters/realParameterNames.kt"); - } - - @TestMetadata("synthesizedParameterNames.kt") - public void testSynthesizedParameterNames() throws Exception { - runTest("compiler/testData/codegen/java8/box/reflection/parameters/synthesizedParameterNames.kt"); - } - } - } -} diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt index 619be6a679f..ffe963603bb 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt @@ -20,7 +20,6 @@ import org.jetbrains.kotlin.checkers.AbstractForeignJava8AnnotationsNoAnnotation import org.jetbrains.kotlin.checkers.AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTest import org.jetbrains.kotlin.checkers.AbstractForeignJava8AnnotationsTest import org.jetbrains.kotlin.checkers.javac.AbstractJavacForeignJava8AnnotationsTest -import org.jetbrains.kotlin.codegen.AbstractBlackBoxCodegenTest import org.jetbrains.kotlin.codegen.AbstractBytecodeTextTest import org.jetbrains.kotlin.codegen.AbstractCompileKotlinAgainstKotlinTest import org.jetbrains.kotlin.codegen.flags.AbstractWriteFlagsTest @@ -34,10 +33,6 @@ fun main(args: Array) { System.setProperty("java.awt.headless", "true") testGroup("compiler/tests-java8/tests", "compiler/testData") { - testClass("BlackBoxWithJava8CodegenTestGenerated") { - model("codegen/java8/box") - } - testClass { model("foreignAnnotationsJava8/tests") } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index a91a224a44c..505ac0e943f 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -161,6 +161,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/annotations/typeAnnotationOnJdk6.kt"); } + @TestMetadata("useTypeParameterAnnotationFromJava.kt") + public void testUseTypeParameterAnnotationFromJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/useTypeParameterAnnotationFromJava.kt"); + } + + @TestMetadata("useTypeUseAnnotationFromJava.kt") + public void testUseTypeUseAnnotationFromJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/useTypeUseAnnotationFromJava.kt"); + } + @TestMetadata("varargInAnnotationParameter.kt") public void testVarargInAnnotationParameter() throws Exception { runTest("compiler/testData/codegen/box/annotations/varargInAnnotationParameter.kt"); @@ -1512,6 +1522,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/builtinStubMethods/delegationToArrayList.kt"); } + @TestMetadata("immutableRemove.kt") + public void testImmutableRemove() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/immutableRemove.kt"); + } + @TestMetadata("implementationInTrait.kt") public void testImplementationInTrait() throws Exception { runTest("compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt"); @@ -1649,6 +1664,67 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/mapEntry.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MapGetOrDefault extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInMapGetOrDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("noTypeSafeBridge.kt") + public void testNoTypeSafeBridge() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault/noTypeSafeBridge.kt"); + } + + @TestMetadata("typeSafeBridge.kt") + public void testTypeSafeBridge() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault/typeSafeBridge.kt"); + } + + @TestMetadata("typeSafeBridgeNotNullAny.kt") + public void testTypeSafeBridgeNotNullAny() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault/typeSafeBridgeNotNullAny.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapRemove") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MapRemove extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInMapRemove() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapRemove"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("noDefaultImpls.kt") + public void testNoDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/noDefaultImpls.kt"); + } + + @TestMetadata("readOnlyMap.kt") + public void testReadOnlyMap() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/readOnlyMap.kt"); + } + + @TestMetadata("typeSafeBridge.kt") + public void testTypeSafeBridge() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/typeSafeBridge.kt"); + } + + @TestMetadata("typeSafeBridgeNotNullAny.kt") + public void testTypeSafeBridgeNotNullAny() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/typeSafeBridgeNotNullAny.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/callableReference") @@ -5375,6 +5451,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } + @TestMetadata("asyncException.kt") + public void testAsyncException_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/asyncException.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("asyncException.kt") + public void testAsyncException_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/asyncException.kt", "kotlin.coroutines"); + } + @TestMetadata("asyncIteratorNullMerge_1_2.kt") public void testAsyncIteratorNullMerge_1_2() throws Exception { runTest("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge_1_2.kt"); @@ -5405,6 +5491,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/coroutines/asyncIterator_1_3.kt"); } + @TestMetadata("async.kt") + public void testAsync_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/async.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("async.kt") + public void testAsync_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/async.kt", "kotlin.coroutines"); + } + @TestMetadata("await.kt") public void testAwait_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/await.kt", "kotlin.coroutines.experimental"); @@ -9138,6 +9234,21 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } + @TestMetadata("byMiddleInterface.kt") + public void testByMiddleInterface() throws Exception { + runTest("compiler/testData/codegen/box/delegation/byMiddleInterface.kt"); + } + + @TestMetadata("defaultOverride.kt") + public void testDefaultOverride() throws Exception { + runTest("compiler/testData/codegen/box/delegation/defaultOverride.kt"); + } + + @TestMetadata("delegationToMap.kt") + public void testDelegationToMap() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationToMap.kt"); + } + @TestMetadata("delegationToVal.kt") public void testDelegationToVal() throws Exception { runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); @@ -9148,16 +9259,46 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); } + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/delegation/diamond.kt"); + } + + @TestMetadata("diamond2.kt") + public void testDiamond2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/diamond2.kt"); + } + @TestMetadata("hiddenSuperOverrideIn1.0.kt") public void testHiddenSuperOverrideIn1_0() throws Exception { runTest("compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt"); } + @TestMetadata("inClassDeclaration.kt") + public void testInClassDeclaration() throws Exception { + runTest("compiler/testData/codegen/box/delegation/inClassDeclaration.kt"); + } + @TestMetadata("kt8154.kt") public void testKt8154() throws Exception { runTest("compiler/testData/codegen/box/delegation/kt8154.kt"); } + @TestMetadata("mixed.kt") + public void testMixed() throws Exception { + runTest("compiler/testData/codegen/box/delegation/mixed.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/delegation/simple.kt"); + } + + @TestMetadata("simple1.0.kt") + public void testSimple1_0() throws Exception { + runTest("compiler/testData/codegen/box/delegation/simple1.0.kt"); + } + @TestMetadata("withDefaultParameters.kt") public void testWithDefaultParameters() throws Exception { runTest("compiler/testData/codegen/box/delegation/withDefaultParameters.kt"); @@ -13197,6 +13338,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); } + @TestMetadata("functionAssertion.kt") + public void testFunctionAssertion() throws Exception { + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/functionAssertion.kt"); + } + @TestMetadata("functionWithBigArity.kt") public void testFunctionWithBigArity() throws Exception { runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/functionWithBigArity.kt"); @@ -13381,6 +13527,500 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public void testKt1397() throws Exception { runTest("compiler/testData/codegen/box/jdk/kt1397.kt"); } + + @TestMetadata("removeIf.kt") + public void testRemoveIf() throws Exception { + runTest("compiler/testData/codegen/box/jdk/removeIf.kt"); + } + + @TestMetadata("stream.kt") + public void testStream() throws Exception { + runTest("compiler/testData/codegen/box/jdk/stream.kt"); + } + + @TestMetadata("streamBackwardCompatibility.kt") + public void testStreamBackwardCompatibility() throws Exception { + runTest("compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt"); + } + + @TestMetadata("useStream.kt") + public void testUseStream() throws Exception { + runTest("compiler/testData/codegen/box/jdk/useStream.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8 extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInJvm8() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("bridgeInClass.kt") + public void testBridgeInClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/bridgeInClass.kt"); + } + + @TestMetadata("bridgeInInterface.kt") + public void testBridgeInInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/bridgeInInterface.kt"); + } + + @TestMetadata("capturedSuperCall.kt") + public void testCapturedSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/capturedSuperCall.kt"); + } + + @TestMetadata("defaultArgs.kt") + public void testDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaultArgs.kt"); + } + + @TestMetadata("inlineFromAnotherFile.kt") + public void testInlineFromAnotherFile() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/inlineFromAnotherFile.kt"); + } + + @TestMetadata("inlineFromStdlib.kt") + public void testInlineFromStdlib() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/inlineFromStdlib.kt"); + } + + @TestMetadata("kt11969.kt") + public void testKt11969() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt11969.kt"); + } + + @TestMetadata("kt14243.kt") + public void testKt14243() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt14243.kt"); + } + + @TestMetadata("kt14243_2.kt") + public void testKt14243_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt14243_2.kt"); + } + + @TestMetadata("kt14243_prop.kt") + public void testKt14243_prop() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt14243_prop.kt"); + } + + @TestMetadata("kt16581.kt") + public void testKt16581() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt16581.kt"); + } + + @TestMetadata("kt16581_2.kt") + public void testKt16581_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt16581_2.kt"); + } + + @TestMetadata("kt16588.kt") + public void testKt16588() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt16588.kt"); + } + + @TestMetadata("kt6301.kt") + public void testKt6301() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt6301.kt"); + } + + @TestMetadata("kt6301_2.kt") + public void testKt6301_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt6301_2.kt"); + } + + @TestMetadata("oneImplementation.kt") + public void testOneImplementation() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/oneImplementation.kt"); + } + + @TestMetadata("oneImplementation2.kt") + public void testOneImplementation2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/oneImplementation2.kt"); + } + + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/simpleCall.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/simpleProperty.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Defaults extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + @TestMetadata("accessor.kt") + public void testAccessor() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/accessor.kt"); + } + + @TestMetadata("accessorFromCompanion.kt") + public void testAccessorFromCompanion() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/accessorFromCompanion.kt"); + } + + @TestMetadata("accessorsFromDefaultImpls.kt") + public void testAccessorsFromDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/accessorsFromDefaultImpls.kt"); + } + + public void testAllFilesPresentInDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("bridgeInClass.kt") + public void testBridgeInClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInClass.kt"); + } + + @TestMetadata("bridgeInInterface.kt") + public void testBridgeInInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterface.kt"); + } + + @TestMetadata("bridgeInInterface2.kt") + public void testBridgeInInterface2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterface2.kt"); + } + + @TestMetadata("bridgeInInterfaceWithProperties.kt") + public void testBridgeInInterfaceWithProperties() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterfaceWithProperties.kt"); + } + + @TestMetadata("bridgeInInterfaceWithProperties2.kt") + public void testBridgeInInterfaceWithProperties2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterfaceWithProperties2.kt"); + } + + @TestMetadata("bridgeWithJava.kt") + public void testBridgeWithJava() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeWithJava.kt"); + } + + @TestMetadata("callableReference.kt") + public void testCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/callableReference.kt"); + } + + @TestMetadata("capturedSuperCall.kt") + public void testCapturedSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/capturedSuperCall.kt"); + } + + @TestMetadata("defaultArgs.kt") + public void testDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/defaultArgs.kt"); + } + + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/diamond.kt"); + } + + @TestMetadata("inline.kt") + public void testInline() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/inline.kt"); + } + + @TestMetadata("inlineProperty.kt") + public void testInlineProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/inlineProperty.kt"); + } + + @TestMetadata("kt11969.kt") + public void testKt11969() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt11969.kt"); + } + + @TestMetadata("kt14243.kt") + public void testKt14243() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243.kt"); + } + + @TestMetadata("kt14243_2.kt") + public void testKt14243_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243_2.kt"); + } + + @TestMetadata("kt14243_prop.kt") + public void testKt14243_prop() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243_prop.kt"); + } + + @TestMetadata("oneImplementation.kt") + public void testOneImplementation() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/oneImplementation.kt"); + } + + @TestMetadata("oneImplementation2.kt") + public void testOneImplementation2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/oneImplementation2.kt"); + } + + @TestMetadata("privateDefaultFromDefaultImpl.kt") + public void testPrivateDefaultFromDefaultImpl() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/privateDefaultFromDefaultImpl.kt"); + } + + @TestMetadata("privateInDefaultImpls.kt") + public void testPrivateInDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/privateInDefaultImpls.kt"); + } + + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/simpleCall.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/simpleProperty.kt"); + } + + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/superCall.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Compatibility extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInCompatibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("bridge.kt") + public void testBridge() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge.kt"); + } + + @TestMetadata("bridge2.kt") + public void testBridge2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge2.kt"); + } + + @TestMetadata("bridge3.kt") + public void testBridge3() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge3.kt"); + } + + @TestMetadata("bridgeWithProperties.kt") + public void testBridgeWithProperties() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties.kt"); + } + + @TestMetadata("bridgeWithProperties2.kt") + public void testBridgeWithProperties2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties2.kt"); + } + + @TestMetadata("bridgeWithProperties3.kt") + public void testBridgeWithProperties3() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties3.kt"); + } + + @TestMetadata("defaultArgs.kt") + public void testDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/defaultArgs.kt"); + } + + @TestMetadata("inheritedJvmDefault.kt") + public void testInheritedJvmDefault() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/inheritedJvmDefault.kt"); + } + + @TestMetadata("propertyAnnotation.kt") + public void testPropertyAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/propertyAnnotation.kt"); + } + + @TestMetadata("simpleFunction.kt") + public void testSimpleFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/simpleFunction.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/delegationBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/simpleProperty.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NoDelegation extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInNoDelegation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("noDelegationToDefaultMethodInClass.kt") + public void testNoDelegationToDefaultMethodInClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInClass.kt"); + } + + @TestMetadata("noDelegationToDefaultMethodInInterface.kt") + public void testNoDelegationToDefaultMethodInInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface.kt"); + } + + @TestMetadata("noDelegationToDefaultMethodInInterface2.kt") + public void testNoDelegationToDefaultMethodInInterface2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface2.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/reflection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reflection extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInReflection() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("propertyAnnotations.kt") + public void testPropertyAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/reflection/propertyAnnotations.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/interfaceFlag") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InterfaceFlag extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInInterfaceFlag() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/interfaceFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/interfaceFlag/superCall.kt"); + } + + @TestMetadata("superCallIndirect.kt") + public void testSuperCallIndirect() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/interfaceFlag/superCallIndirect.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/javaDefaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaDefaults extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInJavaDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/javaDefaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("capturedSuperCall.kt") + public void testCapturedSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/capturedSuperCall.kt"); + } + + @TestMetadata("defaultMethodCallFromInterface.kt") + public void testDefaultMethodCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodCallFromInterface.kt"); + } + + @TestMetadata("defaultMethodCallViaClass.kt") + public void testDefaultMethodCallViaClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodCallViaClass.kt"); + } + + @TestMetadata("defaultMethodCallViaInterface.kt") + public void testDefaultMethodCallViaInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodCallViaInterface.kt"); + } + + @TestMetadata("defaultMethodOverride.kt") + public void testDefaultMethodOverride() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodOverride.kt"); + } + + @TestMetadata("dontDelegateToDefaultMethods.kt") + public void testDontDelegateToDefaultMethods() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/dontDelegateToDefaultMethods.kt"); + } + + @TestMetadata("inheritKotlin.kt") + public void testInheritKotlin() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/inheritKotlin.kt"); + } + + @TestMetadata("invokeDefaultViaSuper.kt") + public void testInvokeDefaultViaSuper() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/invokeDefaultViaSuper.kt"); + } + + @TestMetadata("invokeDefaultViaSuper_16.kt") + public void testInvokeDefaultViaSuper_16() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/invokeDefaultViaSuper_16.kt"); + } + + @TestMetadata("longChainOfKotlinExtendsFromJavaWithDefault.kt") + public void testLongChainOfKotlinExtendsFromJavaWithDefault() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/longChainOfKotlinExtendsFromJavaWithDefault.kt"); + } + + @TestMetadata("samOnInterfaceWithDefaultMethod.kt") + public void testSamOnInterfaceWithDefaultMethod() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/samOnInterfaceWithDefaultMethod.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/jvmField") @@ -15775,6 +16415,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } + @TestMetadata("hashCode.kt") + public void testHashCode() throws Exception { + runTest("compiler/testData/codegen/box/optimizations/hashCode.kt"); + } + @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { runTest("compiler/testData/codegen/box/optimizations/kt20844.kt"); @@ -15854,6 +16499,54 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @TestMetadata("compiler/testData/codegen/box/parametersMetadata") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ParametersMetadata extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInParametersMetadata() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/parametersMetadata"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("defaultImpls.kt") + public void testDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/defaultImpls.kt"); + } + + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/delegation.kt"); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/enum.kt"); + } + + @TestMetadata("extensionFunction.kt") + public void testExtensionFunction() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/extensionFunction.kt"); + } + + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/function.kt"); + } + + @TestMetadata("innerClass.kt") + public void testInnerClass() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/innerClass.kt"); + } + + @TestMetadata("superParams.kt") + public void testSuperParams() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/superParams.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/platformTypes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -19963,6 +20656,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public void testPropertySetter() throws Exception { runTest("compiler/testData/codegen/box/reflection/parameters/propertySetter.kt"); } + + @TestMetadata("realParameterNames.kt") + public void testRealParameterNames() throws Exception { + runTest("compiler/testData/codegen/box/reflection/parameters/realParameterNames.kt"); + } + + @TestMetadata("synthesizedParameterNames.kt") + public void testSynthesizedParameterNames() throws Exception { + runTest("compiler/testData/codegen/box/reflection/parameters/synthesizedParameterNames.kt"); + } } @TestMetadata("compiler/testData/codegen/box/reflection/properties") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 8a7b4b3e300..942fba00c3f 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -166,6 +166,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/annotations/typeAnnotationOnJdk6.kt"); } + @TestMetadata("useTypeParameterAnnotationFromJava.kt") + public void testUseTypeParameterAnnotationFromJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/useTypeParameterAnnotationFromJava.kt"); + } + + @TestMetadata("useTypeUseAnnotationFromJava.kt") + public void testUseTypeUseAnnotationFromJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/useTypeUseAnnotationFromJava.kt"); + } + @TestMetadata("varargInAnnotationParameter.kt") public void testVarargInAnnotationParameter() throws Exception { runTest("compiler/testData/codegen/box/annotations/varargInAnnotationParameter.kt"); @@ -1512,6 +1522,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/builtinStubMethods/delegationToArrayList.kt"); } + @TestMetadata("immutableRemove.kt") + public void testImmutableRemove() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/immutableRemove.kt"); + } + @TestMetadata("implementationInTrait.kt") public void testImplementationInTrait() throws Exception { runTest("compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt"); @@ -1649,6 +1664,67 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/mapEntry.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MapGetOrDefault extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInMapGetOrDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("noTypeSafeBridge.kt") + public void testNoTypeSafeBridge() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault/noTypeSafeBridge.kt"); + } + + @TestMetadata("typeSafeBridge.kt") + public void testTypeSafeBridge() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault/typeSafeBridge.kt"); + } + + @TestMetadata("typeSafeBridgeNotNullAny.kt") + public void testTypeSafeBridgeNotNullAny() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault/typeSafeBridgeNotNullAny.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapRemove") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MapRemove extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInMapRemove() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapRemove"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("noDefaultImpls.kt") + public void testNoDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/noDefaultImpls.kt"); + } + + @TestMetadata("readOnlyMap.kt") + public void testReadOnlyMap() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/readOnlyMap.kt"); + } + + @TestMetadata("typeSafeBridge.kt") + public void testTypeSafeBridge() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/typeSafeBridge.kt"); + } + + @TestMetadata("typeSafeBridgeNotNullAny.kt") + public void testTypeSafeBridgeNotNullAny() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/typeSafeBridgeNotNullAny.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/callableReference") @@ -5375,6 +5451,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } + @TestMetadata("asyncException.kt") + public void testAsyncException_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/asyncException.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("asyncException.kt") + public void testAsyncException_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/asyncException.kt", "kotlin.coroutines"); + } + @TestMetadata("asyncIteratorNullMerge_1_2.kt") public void testAsyncIteratorNullMerge_1_2() throws Exception { runTest("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge_1_2.kt"); @@ -5405,6 +5491,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/coroutines/asyncIterator_1_3.kt"); } + @TestMetadata("async.kt") + public void testAsync_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/async.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("async.kt") + public void testAsync_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/async.kt", "kotlin.coroutines"); + } + @TestMetadata("await.kt") public void testAwait_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/await.kt", "kotlin.coroutines.experimental"); @@ -9143,6 +9239,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } + @TestMetadata("byMiddleInterface.kt") + public void testByMiddleInterface() throws Exception { + runTest("compiler/testData/codegen/box/delegation/byMiddleInterface.kt"); + } + + @TestMetadata("defaultOverride.kt") + public void testDefaultOverride() throws Exception { + runTest("compiler/testData/codegen/box/delegation/defaultOverride.kt"); + } + + @TestMetadata("delegationToMap.kt") + public void testDelegationToMap() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationToMap.kt"); + } + @TestMetadata("delegationToVal.kt") public void testDelegationToVal() throws Exception { runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); @@ -9153,15 +9264,45 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); } + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/delegation/diamond.kt"); + } + + @TestMetadata("diamond2.kt") + public void testDiamond2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/diamond2.kt"); + } + @TestMetadata("hiddenSuperOverrideIn1.0.kt") public void testHiddenSuperOverrideIn1_0() throws Exception { runTest("compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt"); } + @TestMetadata("inClassDeclaration.kt") + public void testInClassDeclaration() throws Exception { + runTest("compiler/testData/codegen/box/delegation/inClassDeclaration.kt"); + } + @TestMetadata("kt8154.kt") public void testKt8154() throws Exception { runTest("compiler/testData/codegen/box/delegation/kt8154.kt"); } + + @TestMetadata("mixed.kt") + public void testMixed() throws Exception { + runTest("compiler/testData/codegen/box/delegation/mixed.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/delegation/simple.kt"); + } + + @TestMetadata("simple1.0.kt") + public void testSimple1_0() throws Exception { + runTest("compiler/testData/codegen/box/delegation/simple1.0.kt"); + } } @TestMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam") @@ -13197,6 +13338,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); } + @TestMetadata("functionAssertion.kt") + public void testFunctionAssertion() throws Exception { + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/functionAssertion.kt"); + } + @TestMetadata("functionWithBigArity.kt") public void testFunctionWithBigArity() throws Exception { runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/functionWithBigArity.kt"); @@ -13381,6 +13527,500 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public void testKt1397() throws Exception { runTest("compiler/testData/codegen/box/jdk/kt1397.kt"); } + + @TestMetadata("removeIf.kt") + public void testRemoveIf() throws Exception { + runTest("compiler/testData/codegen/box/jdk/removeIf.kt"); + } + + @TestMetadata("stream.kt") + public void testStream() throws Exception { + runTest("compiler/testData/codegen/box/jdk/stream.kt"); + } + + @TestMetadata("streamBackwardCompatibility.kt") + public void testStreamBackwardCompatibility() throws Exception { + runTest("compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt"); + } + + @TestMetadata("useStream.kt") + public void testUseStream() throws Exception { + runTest("compiler/testData/codegen/box/jdk/useStream.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8 extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInJvm8() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("bridgeInClass.kt") + public void testBridgeInClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/bridgeInClass.kt"); + } + + @TestMetadata("bridgeInInterface.kt") + public void testBridgeInInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/bridgeInInterface.kt"); + } + + @TestMetadata("capturedSuperCall.kt") + public void testCapturedSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/capturedSuperCall.kt"); + } + + @TestMetadata("defaultArgs.kt") + public void testDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaultArgs.kt"); + } + + @TestMetadata("inlineFromAnotherFile.kt") + public void testInlineFromAnotherFile() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/inlineFromAnotherFile.kt"); + } + + @TestMetadata("inlineFromStdlib.kt") + public void testInlineFromStdlib() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/inlineFromStdlib.kt"); + } + + @TestMetadata("kt11969.kt") + public void testKt11969() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt11969.kt"); + } + + @TestMetadata("kt14243.kt") + public void testKt14243() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt14243.kt"); + } + + @TestMetadata("kt14243_2.kt") + public void testKt14243_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt14243_2.kt"); + } + + @TestMetadata("kt14243_prop.kt") + public void testKt14243_prop() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt14243_prop.kt"); + } + + @TestMetadata("kt16581.kt") + public void testKt16581() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt16581.kt"); + } + + @TestMetadata("kt16581_2.kt") + public void testKt16581_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt16581_2.kt"); + } + + @TestMetadata("kt16588.kt") + public void testKt16588() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt16588.kt"); + } + + @TestMetadata("kt6301.kt") + public void testKt6301() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt6301.kt"); + } + + @TestMetadata("kt6301_2.kt") + public void testKt6301_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt6301_2.kt"); + } + + @TestMetadata("oneImplementation.kt") + public void testOneImplementation() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/oneImplementation.kt"); + } + + @TestMetadata("oneImplementation2.kt") + public void testOneImplementation2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/oneImplementation2.kt"); + } + + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/simpleCall.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/simpleProperty.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Defaults extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + @TestMetadata("accessor.kt") + public void testAccessor() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/accessor.kt"); + } + + @TestMetadata("accessorFromCompanion.kt") + public void testAccessorFromCompanion() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/accessorFromCompanion.kt"); + } + + @TestMetadata("accessorsFromDefaultImpls.kt") + public void testAccessorsFromDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/accessorsFromDefaultImpls.kt"); + } + + public void testAllFilesPresentInDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("bridgeInClass.kt") + public void testBridgeInClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInClass.kt"); + } + + @TestMetadata("bridgeInInterface.kt") + public void testBridgeInInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterface.kt"); + } + + @TestMetadata("bridgeInInterface2.kt") + public void testBridgeInInterface2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterface2.kt"); + } + + @TestMetadata("bridgeInInterfaceWithProperties.kt") + public void testBridgeInInterfaceWithProperties() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterfaceWithProperties.kt"); + } + + @TestMetadata("bridgeInInterfaceWithProperties2.kt") + public void testBridgeInInterfaceWithProperties2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterfaceWithProperties2.kt"); + } + + @TestMetadata("bridgeWithJava.kt") + public void testBridgeWithJava() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeWithJava.kt"); + } + + @TestMetadata("callableReference.kt") + public void testCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/callableReference.kt"); + } + + @TestMetadata("capturedSuperCall.kt") + public void testCapturedSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/capturedSuperCall.kt"); + } + + @TestMetadata("defaultArgs.kt") + public void testDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/defaultArgs.kt"); + } + + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/diamond.kt"); + } + + @TestMetadata("inline.kt") + public void testInline() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/inline.kt"); + } + + @TestMetadata("inlineProperty.kt") + public void testInlineProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/inlineProperty.kt"); + } + + @TestMetadata("kt11969.kt") + public void testKt11969() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt11969.kt"); + } + + @TestMetadata("kt14243.kt") + public void testKt14243() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243.kt"); + } + + @TestMetadata("kt14243_2.kt") + public void testKt14243_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243_2.kt"); + } + + @TestMetadata("kt14243_prop.kt") + public void testKt14243_prop() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243_prop.kt"); + } + + @TestMetadata("oneImplementation.kt") + public void testOneImplementation() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/oneImplementation.kt"); + } + + @TestMetadata("oneImplementation2.kt") + public void testOneImplementation2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/oneImplementation2.kt"); + } + + @TestMetadata("privateDefaultFromDefaultImpl.kt") + public void testPrivateDefaultFromDefaultImpl() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/privateDefaultFromDefaultImpl.kt"); + } + + @TestMetadata("privateInDefaultImpls.kt") + public void testPrivateInDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/privateInDefaultImpls.kt"); + } + + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/simpleCall.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/simpleProperty.kt"); + } + + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/superCall.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Compatibility extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInCompatibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("bridge.kt") + public void testBridge() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge.kt"); + } + + @TestMetadata("bridge2.kt") + public void testBridge2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge2.kt"); + } + + @TestMetadata("bridge3.kt") + public void testBridge3() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge3.kt"); + } + + @TestMetadata("bridgeWithProperties.kt") + public void testBridgeWithProperties() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties.kt"); + } + + @TestMetadata("bridgeWithProperties2.kt") + public void testBridgeWithProperties2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties2.kt"); + } + + @TestMetadata("bridgeWithProperties3.kt") + public void testBridgeWithProperties3() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties3.kt"); + } + + @TestMetadata("defaultArgs.kt") + public void testDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/defaultArgs.kt"); + } + + @TestMetadata("inheritedJvmDefault.kt") + public void testInheritedJvmDefault() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/inheritedJvmDefault.kt"); + } + + @TestMetadata("propertyAnnotation.kt") + public void testPropertyAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/propertyAnnotation.kt"); + } + + @TestMetadata("simpleFunction.kt") + public void testSimpleFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/simpleFunction.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/delegationBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/simpleProperty.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NoDelegation extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInNoDelegation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("noDelegationToDefaultMethodInClass.kt") + public void testNoDelegationToDefaultMethodInClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInClass.kt"); + } + + @TestMetadata("noDelegationToDefaultMethodInInterface.kt") + public void testNoDelegationToDefaultMethodInInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface.kt"); + } + + @TestMetadata("noDelegationToDefaultMethodInInterface2.kt") + public void testNoDelegationToDefaultMethodInInterface2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface2.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/reflection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reflection extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInReflection() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("propertyAnnotations.kt") + public void testPropertyAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/reflection/propertyAnnotations.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/interfaceFlag") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InterfaceFlag extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInInterfaceFlag() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/interfaceFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/interfaceFlag/superCall.kt"); + } + + @TestMetadata("superCallIndirect.kt") + public void testSuperCallIndirect() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/interfaceFlag/superCallIndirect.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/javaDefaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaDefaults extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInJavaDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/javaDefaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("capturedSuperCall.kt") + public void testCapturedSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/capturedSuperCall.kt"); + } + + @TestMetadata("defaultMethodCallFromInterface.kt") + public void testDefaultMethodCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodCallFromInterface.kt"); + } + + @TestMetadata("defaultMethodCallViaClass.kt") + public void testDefaultMethodCallViaClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodCallViaClass.kt"); + } + + @TestMetadata("defaultMethodCallViaInterface.kt") + public void testDefaultMethodCallViaInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodCallViaInterface.kt"); + } + + @TestMetadata("defaultMethodOverride.kt") + public void testDefaultMethodOverride() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodOverride.kt"); + } + + @TestMetadata("dontDelegateToDefaultMethods.kt") + public void testDontDelegateToDefaultMethods() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/dontDelegateToDefaultMethods.kt"); + } + + @TestMetadata("inheritKotlin.kt") + public void testInheritKotlin() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/inheritKotlin.kt"); + } + + @TestMetadata("invokeDefaultViaSuper.kt") + public void testInvokeDefaultViaSuper() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/invokeDefaultViaSuper.kt"); + } + + @TestMetadata("invokeDefaultViaSuper_16.kt") + public void testInvokeDefaultViaSuper_16() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/invokeDefaultViaSuper_16.kt"); + } + + @TestMetadata("longChainOfKotlinExtendsFromJavaWithDefault.kt") + public void testLongChainOfKotlinExtendsFromJavaWithDefault() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/longChainOfKotlinExtendsFromJavaWithDefault.kt"); + } + + @TestMetadata("samOnInterfaceWithDefaultMethod.kt") + public void testSamOnInterfaceWithDefaultMethod() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/samOnInterfaceWithDefaultMethod.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/jvmField") @@ -15775,6 +16415,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } + @TestMetadata("hashCode.kt") + public void testHashCode() throws Exception { + runTest("compiler/testData/codegen/box/optimizations/hashCode.kt"); + } + @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { runTest("compiler/testData/codegen/box/optimizations/kt20844.kt"); @@ -15854,6 +16499,54 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/parametersMetadata") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ParametersMetadata extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInParametersMetadata() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/parametersMetadata"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("defaultImpls.kt") + public void testDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/defaultImpls.kt"); + } + + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/delegation.kt"); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/enum.kt"); + } + + @TestMetadata("extensionFunction.kt") + public void testExtensionFunction() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/extensionFunction.kt"); + } + + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/function.kt"); + } + + @TestMetadata("innerClass.kt") + public void testInnerClass() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/innerClass.kt"); + } + + @TestMetadata("superParams.kt") + public void testSuperParams() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/superParams.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/platformTypes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -19963,6 +20656,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public void testPropertySetter() throws Exception { runTest("compiler/testData/codegen/box/reflection/parameters/propertySetter.kt"); } + + @TestMetadata("realParameterNames.kt") + public void testRealParameterNames() throws Exception { + runTest("compiler/testData/codegen/box/reflection/parameters/realParameterNames.kt"); + } + + @TestMetadata("synthesizedParameterNames.kt") + public void testSynthesizedParameterNames() throws Exception { + runTest("compiler/testData/codegen/box/reflection/parameters/synthesizedParameterNames.kt"); + } } @TestMetadata("compiler/testData/codegen/box/reflection/properties") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 87db88d921b..7ea1bd549a3 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -161,6 +161,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/annotations/typeAnnotationOnJdk6.kt"); } + @TestMetadata("useTypeParameterAnnotationFromJava.kt") + public void testUseTypeParameterAnnotationFromJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/useTypeParameterAnnotationFromJava.kt"); + } + + @TestMetadata("useTypeUseAnnotationFromJava.kt") + public void testUseTypeUseAnnotationFromJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/useTypeUseAnnotationFromJava.kt"); + } + @TestMetadata("varargInAnnotationParameter.kt") public void testVarargInAnnotationParameter() throws Exception { runTest("compiler/testData/codegen/box/annotations/varargInAnnotationParameter.kt"); @@ -1512,6 +1522,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/builtinStubMethods/delegationToArrayList.kt"); } + @TestMetadata("immutableRemove.kt") + public void testImmutableRemove() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/immutableRemove.kt"); + } + @TestMetadata("implementationInTrait.kt") public void testImplementationInTrait() throws Exception { runTest("compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt"); @@ -1649,6 +1664,67 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/mapEntry.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MapGetOrDefault extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInMapGetOrDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("noTypeSafeBridge.kt") + public void testNoTypeSafeBridge() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault/noTypeSafeBridge.kt"); + } + + @TestMetadata("typeSafeBridge.kt") + public void testTypeSafeBridge() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault/typeSafeBridge.kt"); + } + + @TestMetadata("typeSafeBridgeNotNullAny.kt") + public void testTypeSafeBridgeNotNullAny() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault/typeSafeBridgeNotNullAny.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapRemove") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MapRemove extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInMapRemove() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapRemove"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("noDefaultImpls.kt") + public void testNoDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/noDefaultImpls.kt"); + } + + @TestMetadata("readOnlyMap.kt") + public void testReadOnlyMap() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/readOnlyMap.kt"); + } + + @TestMetadata("typeSafeBridge.kt") + public void testTypeSafeBridge() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/typeSafeBridge.kt"); + } + + @TestMetadata("typeSafeBridgeNotNullAny.kt") + public void testTypeSafeBridgeNotNullAny() throws Exception { + runTest("compiler/testData/codegen/box/builtinStubMethods/mapRemove/typeSafeBridgeNotNullAny.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/callableReference") @@ -5375,6 +5451,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); } + @TestMetadata("asyncException.kt") + public void testAsyncException_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/asyncException.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("asyncException.kt") + public void testAsyncException_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/asyncException.kt", "kotlin.coroutines"); + } + @TestMetadata("asyncIteratorNullMerge_1_2.kt") public void testAsyncIteratorNullMerge_1_2() throws Exception { runTest("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge_1_2.kt"); @@ -5405,6 +5491,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/coroutines/asyncIterator_1_3.kt"); } + @TestMetadata("async.kt") + public void testAsync_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/async.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("async.kt") + public void testAsync_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/async.kt", "kotlin.coroutines"); + } + @TestMetadata("await.kt") public void testAwait_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/await.kt", "kotlin.coroutines.experimental"); @@ -9138,6 +9234,21 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); } + @TestMetadata("byMiddleInterface.kt") + public void testByMiddleInterface() throws Exception { + runTest("compiler/testData/codegen/box/delegation/byMiddleInterface.kt"); + } + + @TestMetadata("defaultOverride.kt") + public void testDefaultOverride() throws Exception { + runTest("compiler/testData/codegen/box/delegation/defaultOverride.kt"); + } + + @TestMetadata("delegationToMap.kt") + public void testDelegationToMap() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationToMap.kt"); + } + @TestMetadata("delegationToVal.kt") public void testDelegationToVal() throws Exception { runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); @@ -9148,16 +9259,46 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); } + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/delegation/diamond.kt"); + } + + @TestMetadata("diamond2.kt") + public void testDiamond2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/diamond2.kt"); + } + @TestMetadata("hiddenSuperOverrideIn1.0.kt") public void testHiddenSuperOverrideIn1_0() throws Exception { runTest("compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt"); } + @TestMetadata("inClassDeclaration.kt") + public void testInClassDeclaration() throws Exception { + runTest("compiler/testData/codegen/box/delegation/inClassDeclaration.kt"); + } + @TestMetadata("kt8154.kt") public void testKt8154() throws Exception { runTest("compiler/testData/codegen/box/delegation/kt8154.kt"); } + @TestMetadata("mixed.kt") + public void testMixed() throws Exception { + runTest("compiler/testData/codegen/box/delegation/mixed.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/delegation/simple.kt"); + } + + @TestMetadata("simple1.0.kt") + public void testSimple1_0() throws Exception { + runTest("compiler/testData/codegen/box/delegation/simple1.0.kt"); + } + @TestMetadata("withDefaultParameters.kt") public void testWithDefaultParameters() throws Exception { runTest("compiler/testData/codegen/box/delegation/withDefaultParameters.kt"); @@ -13202,6 +13343,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); } + @TestMetadata("functionAssertion.kt") + public void testFunctionAssertion() throws Exception { + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/functionAssertion.kt"); + } + @TestMetadata("functionWithBigArity.kt") public void testFunctionWithBigArity() throws Exception { runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/functionWithBigArity.kt"); @@ -13386,6 +13532,500 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes public void testKt1397() throws Exception { runTest("compiler/testData/codegen/box/jdk/kt1397.kt"); } + + @TestMetadata("removeIf.kt") + public void testRemoveIf() throws Exception { + runTest("compiler/testData/codegen/box/jdk/removeIf.kt"); + } + + @TestMetadata("stream.kt") + public void testStream() throws Exception { + runTest("compiler/testData/codegen/box/jdk/stream.kt"); + } + + @TestMetadata("streamBackwardCompatibility.kt") + public void testStreamBackwardCompatibility() throws Exception { + runTest("compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt"); + } + + @TestMetadata("useStream.kt") + public void testUseStream() throws Exception { + runTest("compiler/testData/codegen/box/jdk/useStream.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8 extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInJvm8() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("bridgeInClass.kt") + public void testBridgeInClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/bridgeInClass.kt"); + } + + @TestMetadata("bridgeInInterface.kt") + public void testBridgeInInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/bridgeInInterface.kt"); + } + + @TestMetadata("capturedSuperCall.kt") + public void testCapturedSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/capturedSuperCall.kt"); + } + + @TestMetadata("defaultArgs.kt") + public void testDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaultArgs.kt"); + } + + @TestMetadata("inlineFromAnotherFile.kt") + public void testInlineFromAnotherFile() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/inlineFromAnotherFile.kt"); + } + + @TestMetadata("inlineFromStdlib.kt") + public void testInlineFromStdlib() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/inlineFromStdlib.kt"); + } + + @TestMetadata("kt11969.kt") + public void testKt11969() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt11969.kt"); + } + + @TestMetadata("kt14243.kt") + public void testKt14243() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt14243.kt"); + } + + @TestMetadata("kt14243_2.kt") + public void testKt14243_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt14243_2.kt"); + } + + @TestMetadata("kt14243_prop.kt") + public void testKt14243_prop() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt14243_prop.kt"); + } + + @TestMetadata("kt16581.kt") + public void testKt16581() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt16581.kt"); + } + + @TestMetadata("kt16581_2.kt") + public void testKt16581_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt16581_2.kt"); + } + + @TestMetadata("kt16588.kt") + public void testKt16588() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt16588.kt"); + } + + @TestMetadata("kt6301.kt") + public void testKt6301() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt6301.kt"); + } + + @TestMetadata("kt6301_2.kt") + public void testKt6301_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/kt6301_2.kt"); + } + + @TestMetadata("oneImplementation.kt") + public void testOneImplementation() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/oneImplementation.kt"); + } + + @TestMetadata("oneImplementation2.kt") + public void testOneImplementation2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/oneImplementation2.kt"); + } + + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/simpleCall.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/simpleProperty.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Defaults extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + @TestMetadata("accessor.kt") + public void testAccessor() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/accessor.kt"); + } + + @TestMetadata("accessorFromCompanion.kt") + public void testAccessorFromCompanion() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/accessorFromCompanion.kt"); + } + + @TestMetadata("accessorsFromDefaultImpls.kt") + public void testAccessorsFromDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/accessorsFromDefaultImpls.kt"); + } + + public void testAllFilesPresentInDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("bridgeInClass.kt") + public void testBridgeInClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInClass.kt"); + } + + @TestMetadata("bridgeInInterface.kt") + public void testBridgeInInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterface.kt"); + } + + @TestMetadata("bridgeInInterface2.kt") + public void testBridgeInInterface2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterface2.kt"); + } + + @TestMetadata("bridgeInInterfaceWithProperties.kt") + public void testBridgeInInterfaceWithProperties() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterfaceWithProperties.kt"); + } + + @TestMetadata("bridgeInInterfaceWithProperties2.kt") + public void testBridgeInInterfaceWithProperties2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterfaceWithProperties2.kt"); + } + + @TestMetadata("bridgeWithJava.kt") + public void testBridgeWithJava() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeWithJava.kt"); + } + + @TestMetadata("callableReference.kt") + public void testCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/callableReference.kt"); + } + + @TestMetadata("capturedSuperCall.kt") + public void testCapturedSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/capturedSuperCall.kt"); + } + + @TestMetadata("defaultArgs.kt") + public void testDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/defaultArgs.kt"); + } + + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/diamond.kt"); + } + + @TestMetadata("inline.kt") + public void testInline() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/inline.kt"); + } + + @TestMetadata("inlineProperty.kt") + public void testInlineProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/inlineProperty.kt"); + } + + @TestMetadata("kt11969.kt") + public void testKt11969() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt11969.kt"); + } + + @TestMetadata("kt14243.kt") + public void testKt14243() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243.kt"); + } + + @TestMetadata("kt14243_2.kt") + public void testKt14243_2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243_2.kt"); + } + + @TestMetadata("kt14243_prop.kt") + public void testKt14243_prop() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243_prop.kt"); + } + + @TestMetadata("oneImplementation.kt") + public void testOneImplementation() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/oneImplementation.kt"); + } + + @TestMetadata("oneImplementation2.kt") + public void testOneImplementation2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/oneImplementation2.kt"); + } + + @TestMetadata("privateDefaultFromDefaultImpl.kt") + public void testPrivateDefaultFromDefaultImpl() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/privateDefaultFromDefaultImpl.kt"); + } + + @TestMetadata("privateInDefaultImpls.kt") + public void testPrivateInDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/privateInDefaultImpls.kt"); + } + + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/simpleCall.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/simpleProperty.kt"); + } + + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/superCall.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Compatibility extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInCompatibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("bridge.kt") + public void testBridge() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge.kt"); + } + + @TestMetadata("bridge2.kt") + public void testBridge2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge2.kt"); + } + + @TestMetadata("bridge3.kt") + public void testBridge3() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge3.kt"); + } + + @TestMetadata("bridgeWithProperties.kt") + public void testBridgeWithProperties() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties.kt"); + } + + @TestMetadata("bridgeWithProperties2.kt") + public void testBridgeWithProperties2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties2.kt"); + } + + @TestMetadata("bridgeWithProperties3.kt") + public void testBridgeWithProperties3() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties3.kt"); + } + + @TestMetadata("defaultArgs.kt") + public void testDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/defaultArgs.kt"); + } + + @TestMetadata("inheritedJvmDefault.kt") + public void testInheritedJvmDefault() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/inheritedJvmDefault.kt"); + } + + @TestMetadata("propertyAnnotation.kt") + public void testPropertyAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/propertyAnnotation.kt"); + } + + @TestMetadata("simpleFunction.kt") + public void testSimpleFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/simpleFunction.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/delegationBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/simpleProperty.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NoDelegation extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInNoDelegation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("noDelegationToDefaultMethodInClass.kt") + public void testNoDelegationToDefaultMethodInClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInClass.kt"); + } + + @TestMetadata("noDelegationToDefaultMethodInInterface.kt") + public void testNoDelegationToDefaultMethodInInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface.kt"); + } + + @TestMetadata("noDelegationToDefaultMethodInInterface2.kt") + public void testNoDelegationToDefaultMethodInInterface2() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface2.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/reflection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reflection extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInReflection() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("propertyAnnotations.kt") + public void testPropertyAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/reflection/propertyAnnotations.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/interfaceFlag") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InterfaceFlag extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInInterfaceFlag() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/interfaceFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/interfaceFlag/superCall.kt"); + } + + @TestMetadata("superCallIndirect.kt") + public void testSuperCallIndirect() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/interfaceFlag/superCallIndirect.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/javaDefaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaDefaults extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInJavaDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/javaDefaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("capturedSuperCall.kt") + public void testCapturedSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/capturedSuperCall.kt"); + } + + @TestMetadata("defaultMethodCallFromInterface.kt") + public void testDefaultMethodCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodCallFromInterface.kt"); + } + + @TestMetadata("defaultMethodCallViaClass.kt") + public void testDefaultMethodCallViaClass() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodCallViaClass.kt"); + } + + @TestMetadata("defaultMethodCallViaInterface.kt") + public void testDefaultMethodCallViaInterface() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodCallViaInterface.kt"); + } + + @TestMetadata("defaultMethodOverride.kt") + public void testDefaultMethodOverride() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/defaultMethodOverride.kt"); + } + + @TestMetadata("dontDelegateToDefaultMethods.kt") + public void testDontDelegateToDefaultMethods() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/dontDelegateToDefaultMethods.kt"); + } + + @TestMetadata("inheritKotlin.kt") + public void testInheritKotlin() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/inheritKotlin.kt"); + } + + @TestMetadata("invokeDefaultViaSuper.kt") + public void testInvokeDefaultViaSuper() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/invokeDefaultViaSuper.kt"); + } + + @TestMetadata("invokeDefaultViaSuper_16.kt") + public void testInvokeDefaultViaSuper_16() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/invokeDefaultViaSuper_16.kt"); + } + + @TestMetadata("longChainOfKotlinExtendsFromJavaWithDefault.kt") + public void testLongChainOfKotlinExtendsFromJavaWithDefault() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/longChainOfKotlinExtendsFromJavaWithDefault.kt"); + } + + @TestMetadata("samOnInterfaceWithDefaultMethod.kt") + public void testSamOnInterfaceWithDefaultMethod() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/javaDefaults/samOnInterfaceWithDefaultMethod.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/jvmField") @@ -15780,6 +16420,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); } + @TestMetadata("hashCode.kt") + public void testHashCode() throws Exception { + runTest("compiler/testData/codegen/box/optimizations/hashCode.kt"); + } + @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { runTest("compiler/testData/codegen/box/optimizations/kt20844.kt"); @@ -15859,6 +16504,54 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @TestMetadata("compiler/testData/codegen/box/parametersMetadata") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ParametersMetadata extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInParametersMetadata() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/parametersMetadata"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("defaultImpls.kt") + public void testDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/defaultImpls.kt"); + } + + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/delegation.kt"); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/enum.kt"); + } + + @TestMetadata("extensionFunction.kt") + public void testExtensionFunction() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/extensionFunction.kt"); + } + + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/function.kt"); + } + + @TestMetadata("innerClass.kt") + public void testInnerClass() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/innerClass.kt"); + } + + @TestMetadata("superParams.kt") + public void testSuperParams() throws Exception { + runTest("compiler/testData/codegen/box/parametersMetadata/superParams.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/platformTypes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -19968,6 +20661,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes public void testPropertySetter() throws Exception { runTest("compiler/testData/codegen/box/reflection/parameters/propertySetter.kt"); } + + @TestMetadata("realParameterNames.kt") + public void testRealParameterNames() throws Exception { + runTest("compiler/testData/codegen/box/reflection/parameters/realParameterNames.kt"); + } + + @TestMetadata("synthesizedParameterNames.kt") + public void testSynthesizedParameterNames() throws Exception { + runTest("compiler/testData/codegen/box/reflection/parameters/synthesizedParameterNames.kt"); + } } @TestMetadata("compiler/testData/codegen/box/reflection/properties") diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java index 3cddf863bc1..5cb60e109f2 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java @@ -1564,6 +1564,32 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MapGetOrDefault extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInMapGetOrDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapRemove") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MapRemove extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInMapRemove() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapRemove"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + } } @TestMetadata("compiler/testData/codegen/box/callableReference") @@ -11763,6 +11789,110 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/jvm8") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8 extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInJvm8() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Defaults extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Compatibility extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInCompatibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/delegationBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NoDelegation extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNoDelegation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/reflection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reflection extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInReflection() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/interfaceFlag") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InterfaceFlag extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInInterfaceFlag() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/interfaceFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/javaDefaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaDefaults extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInJavaDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/javaDefaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/jvmField") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13994,6 +14124,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/parametersMetadata") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ParametersMetadata extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInParametersMetadata() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/parametersMetadata"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/platformTypes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index d069ebf0201..ce9cccf6239 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -1584,6 +1584,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MapGetOrDefault extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInMapGetOrDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapRemove") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MapRemove extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInMapRemove() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapRemove"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + } } @TestMetadata("compiler/testData/codegen/box/callableReference") @@ -12808,6 +12834,110 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/jvm8") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8 extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInJvm8() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Defaults extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Compatibility extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInCompatibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/delegationBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NoDelegation extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInNoDelegation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/reflection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reflection extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInReflection() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/interfaceFlag") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InterfaceFlag extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInInterfaceFlag() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/interfaceFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/jvm8/javaDefaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaDefaults extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInJavaDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvm8/javaDefaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/jvmField") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -15039,6 +15169,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/parametersMetadata") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ParametersMetadata extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInParametersMetadata() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/parametersMetadata"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/platformTypes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)