From e943b9c9ab52ff26e39f11e7a5e1dcfdab2aaf1d Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Wed, 6 Mar 2013 16:44:57 +0400 Subject: [PATCH] Moved compiledJava cases to generated test. --- .../compiledJava}/MyEnum.java | 1 + .../compiledJava/MyEnum.txt} | 0 .../compiledJava}/inner.java | 0 .../compiledJava}/inner.txt | 0 .../ProtectedPackageConstructor.java | 0 .../ProtectedPackageConstructor.txt | 0 .../ProtectedPackageFun.java | 0 .../protectedPackage}/ProtectedPackageFun.txt | 0 .../ProtectedPackageProperty.java | 0 .../ProtectedPackageProperty.txt | 0 ...nstructorInProtectedStaticNestedClass.java | 0 ...onstructorInProtectedStaticNestedClass.txt | 0 .../ArraysInSubtypes.java | 0 .../ArraysInSubtypes.txt | 0 .../MethodTypeParameterErased.java | 0 .../MethodTypeParameterErased.txt | 0 .../signaturePropagation}/RawSuperType.java | 0 .../signaturePropagation}/RawSuperType.txt | 0 .../ReturnInnerSubclassOfSupersInner.java | 21 + .../ReturnInnerSubclassOfSupersInner.txt | 22 + .../SubclassWithRawType.java | 0 .../SubclassWithRawType.txt | 0 ...oSuperclassesInconsistentGenericTypes.java | 0 ...woSuperclassesInconsistentGenericTypes.txt | 0 .../TwoSuperclassesVarargAndNot.java | 0 .../TwoSuperclassesVarargAndNot.txt | 0 .../compiledJava}/staticFinal/test.java | 0 .../compiledJava/staticFinal/test.txt} | 0 .../jvm/compiler/AbstractLoadJavaTest.java | 7 +- .../jet/jvm/compiler/LoadJavaCustomTest.java | 93 +- .../jvm/compiler/LoadJavaTestGenerated.java | 1660 +++++++++-------- .../jet/generators/tests/GenerateTests.java | 3 +- 32 files changed, 949 insertions(+), 858 deletions(-) rename compiler/testData/{loadJavaCustom/enum/java => loadJava/compiledJava}/MyEnum.java (54%) rename compiler/testData/{loadJavaCustom/enum/expected.txt => loadJava/compiledJava/MyEnum.txt} (100%) rename compiler/testData/{loadJavaCustom => loadJava/compiledJava}/inner.java (100%) rename compiler/testData/{loadJavaCustom => loadJava/compiledJava}/inner.txt (100%) rename compiler/testData/{loadJavaCustom/protectedPackageVisibility => loadJava/compiledJava/protectedPackage}/ProtectedPackageConstructor.java (100%) rename compiler/testData/{loadJavaCustom/protectedPackageVisibility => loadJava/compiledJava/protectedPackage}/ProtectedPackageConstructor.txt (100%) rename compiler/testData/{loadJavaCustom/protectedPackageVisibility => loadJava/compiledJava/protectedPackage}/ProtectedPackageFun.java (100%) rename compiler/testData/{loadJavaCustom/protectedPackageVisibility => loadJava/compiledJava/protectedPackage}/ProtectedPackageFun.txt (100%) rename compiler/testData/{loadJavaCustom/protectedPackageVisibility => loadJava/compiledJava/protectedPackage}/ProtectedPackageProperty.java (100%) rename compiler/testData/{loadJavaCustom/protectedPackageVisibility => loadJava/compiledJava/protectedPackage}/ProtectedPackageProperty.txt (100%) rename compiler/testData/{loadJavaCustom/protectedStaticVisibility/constructor => loadJava/compiledJava/protectedStatic}/ConstructorInProtectedStaticNestedClass.java (100%) rename compiler/testData/{loadJavaCustom/protectedStaticVisibility/constructor => loadJava/compiledJava/protectedStatic}/ConstructorInProtectedStaticNestedClass.txt (100%) rename compiler/testData/{loadJavaCustom/arraysInSubtypes => loadJava/compiledJava/signaturePropagation}/ArraysInSubtypes.java (100%) rename compiler/testData/{loadJavaCustom/arraysInSubtypes => loadJava/compiledJava/signaturePropagation}/ArraysInSubtypes.txt (100%) rename compiler/testData/{loadJavaCustom/methodTypeParameterErased => loadJava/compiledJava/signaturePropagation}/MethodTypeParameterErased.java (100%) rename compiler/testData/{loadJavaCustom/methodTypeParameterErased => loadJava/compiledJava/signaturePropagation}/MethodTypeParameterErased.txt (100%) rename compiler/testData/{loadJavaCustom/rawSuperType => loadJava/compiledJava/signaturePropagation}/RawSuperType.java (100%) rename compiler/testData/{loadJavaCustom/rawSuperType => loadJava/compiledJava/signaturePropagation}/RawSuperType.txt (100%) create mode 100644 compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java create mode 100644 compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.txt rename compiler/testData/{loadJavaCustom/subclassWithRawType => loadJava/compiledJava/signaturePropagation}/SubclassWithRawType.java (100%) rename compiler/testData/{loadJavaCustom/subclassWithRawType => loadJava/compiledJava/signaturePropagation}/SubclassWithRawType.txt (100%) rename compiler/testData/{loadJavaCustom/kotlinSignature => loadJava/compiledJava/signaturePropagation}/TwoSuperclassesInconsistentGenericTypes.java (100%) rename compiler/testData/{loadJavaCustom/kotlinSignature => loadJava/compiledJava/signaturePropagation}/TwoSuperclassesInconsistentGenericTypes.txt (100%) rename compiler/testData/{loadJavaCustom/kotlinSignature => loadJava/compiledJava/signaturePropagation}/TwoSuperclassesVarargAndNot.java (100%) rename compiler/testData/{loadJavaCustom/kotlinSignature => loadJava/compiledJava/signaturePropagation}/TwoSuperclassesVarargAndNot.txt (100%) rename compiler/testData/{loadJavaCustom => loadJava/compiledJava}/staticFinal/test.java (100%) rename compiler/testData/{loadJavaCustom/staticFinal/expected.txt => loadJava/compiledJava/staticFinal/test.txt} (100%) diff --git a/compiler/testData/loadJavaCustom/enum/java/MyEnum.java b/compiler/testData/loadJava/compiledJava/MyEnum.java similarity index 54% rename from compiler/testData/loadJavaCustom/enum/java/MyEnum.java rename to compiler/testData/loadJava/compiledJava/MyEnum.java index d1193ad7bf4..44b3a288b02 100644 --- a/compiler/testData/loadJavaCustom/enum/java/MyEnum.java +++ b/compiler/testData/loadJava/compiledJava/MyEnum.java @@ -1,5 +1,6 @@ package test; +//TODO: move to LoadJavaTestGenerated when possible public enum MyEnum { ENTRY, ANOTHER; diff --git a/compiler/testData/loadJavaCustom/enum/expected.txt b/compiler/testData/loadJava/compiledJava/MyEnum.txt similarity index 100% rename from compiler/testData/loadJavaCustom/enum/expected.txt rename to compiler/testData/loadJava/compiledJava/MyEnum.txt diff --git a/compiler/testData/loadJavaCustom/inner.java b/compiler/testData/loadJava/compiledJava/inner.java similarity index 100% rename from compiler/testData/loadJavaCustom/inner.java rename to compiler/testData/loadJava/compiledJava/inner.java diff --git a/compiler/testData/loadJavaCustom/inner.txt b/compiler/testData/loadJava/compiledJava/inner.txt similarity index 100% rename from compiler/testData/loadJavaCustom/inner.txt rename to compiler/testData/loadJava/compiledJava/inner.txt diff --git a/compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageConstructor.java b/compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java similarity index 100% rename from compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageConstructor.java rename to compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java diff --git a/compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageConstructor.txt b/compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.txt similarity index 100% rename from compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageConstructor.txt rename to compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.txt diff --git a/compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageFun.java b/compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java similarity index 100% rename from compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageFun.java rename to compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java diff --git a/compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageFun.txt b/compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.txt similarity index 100% rename from compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageFun.txt rename to compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.txt diff --git a/compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageProperty.java b/compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java similarity index 100% rename from compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageProperty.java rename to compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java diff --git a/compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageProperty.txt b/compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.txt similarity index 100% rename from compiler/testData/loadJavaCustom/protectedPackageVisibility/ProtectedPackageProperty.txt rename to compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.txt diff --git a/compiler/testData/loadJavaCustom/protectedStaticVisibility/constructor/ConstructorInProtectedStaticNestedClass.java b/compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java similarity index 100% rename from compiler/testData/loadJavaCustom/protectedStaticVisibility/constructor/ConstructorInProtectedStaticNestedClass.java rename to compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java diff --git a/compiler/testData/loadJavaCustom/protectedStaticVisibility/constructor/ConstructorInProtectedStaticNestedClass.txt b/compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.txt similarity index 100% rename from compiler/testData/loadJavaCustom/protectedStaticVisibility/constructor/ConstructorInProtectedStaticNestedClass.txt rename to compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.txt diff --git a/compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.java b/compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java similarity index 100% rename from compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.java rename to compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java diff --git a/compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.txt similarity index 100% rename from compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.txt rename to compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.txt diff --git a/compiler/testData/loadJavaCustom/methodTypeParameterErased/MethodTypeParameterErased.java b/compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java similarity index 100% rename from compiler/testData/loadJavaCustom/methodTypeParameterErased/MethodTypeParameterErased.java rename to compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java diff --git a/compiler/testData/loadJavaCustom/methodTypeParameterErased/MethodTypeParameterErased.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.txt similarity index 100% rename from compiler/testData/loadJavaCustom/methodTypeParameterErased/MethodTypeParameterErased.txt rename to compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.txt diff --git a/compiler/testData/loadJavaCustom/rawSuperType/RawSuperType.java b/compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java similarity index 100% rename from compiler/testData/loadJavaCustom/rawSuperType/RawSuperType.java rename to compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java diff --git a/compiler/testData/loadJavaCustom/rawSuperType/RawSuperType.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.txt similarity index 100% rename from compiler/testData/loadJavaCustom/rawSuperType/RawSuperType.txt rename to compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.txt diff --git a/compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java b/compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java new file mode 100644 index 00000000000..fbb7c27258e --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java @@ -0,0 +1,21 @@ +package test; + +//This test could be written in simple load java test, but KT-3128 prevents from writing Kotlin counterpart for it +//See the same test data in sourceJava test data +public interface ReturnInnerSubclassOfSupersInner { + class Super { + class Inner { + Super get() { + throw new UnsupportedOperationException(); + } + } + } + + class Sub extends Super { + class Inner extends Super.Inner { + Sub get() { + throw new UnsupportedOperationException(); + } + } + } +} diff --git a/compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.txt new file mode 100644 index 00000000000..83e44cd68e8 --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.txt @@ -0,0 +1,22 @@ +package test + +public trait ReturnInnerSubclassOfSupersInner : java.lang.Object { + + public open class Sub : test.ReturnInnerSubclassOfSupersInner.Super { + public constructor Sub() + + public/*package*/ open inner class Inner : test.ReturnInnerSubclassOfSupersInner.Super.Inner { + public/*package*/ constructor Inner() + public/*package*/ open override /*1*/ fun get() : test.ReturnInnerSubclassOfSupersInner.Sub? + } + } + + public open class Super : java.lang.Object { + public constructor Super() + + public/*package*/ open inner class Inner : java.lang.Object { + public/*package*/ constructor Inner() + public/*package*/ open fun get() : test.ReturnInnerSubclassOfSupersInner.Super? + } + } +} diff --git a/compiler/testData/loadJavaCustom/subclassWithRawType/SubclassWithRawType.java b/compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java similarity index 100% rename from compiler/testData/loadJavaCustom/subclassWithRawType/SubclassWithRawType.java rename to compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java diff --git a/compiler/testData/loadJavaCustom/subclassWithRawType/SubclassWithRawType.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.txt similarity index 100% rename from compiler/testData/loadJavaCustom/subclassWithRawType/SubclassWithRawType.txt rename to compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.txt diff --git a/compiler/testData/loadJavaCustom/kotlinSignature/TwoSuperclassesInconsistentGenericTypes.java b/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java similarity index 100% rename from compiler/testData/loadJavaCustom/kotlinSignature/TwoSuperclassesInconsistentGenericTypes.java rename to compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java diff --git a/compiler/testData/loadJavaCustom/kotlinSignature/TwoSuperclassesInconsistentGenericTypes.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.txt similarity index 100% rename from compiler/testData/loadJavaCustom/kotlinSignature/TwoSuperclassesInconsistentGenericTypes.txt rename to compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.txt diff --git a/compiler/testData/loadJavaCustom/kotlinSignature/TwoSuperclassesVarargAndNot.java b/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.java similarity index 100% rename from compiler/testData/loadJavaCustom/kotlinSignature/TwoSuperclassesVarargAndNot.java rename to compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.java diff --git a/compiler/testData/loadJavaCustom/kotlinSignature/TwoSuperclassesVarargAndNot.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.txt similarity index 100% rename from compiler/testData/loadJavaCustom/kotlinSignature/TwoSuperclassesVarargAndNot.txt rename to compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.txt diff --git a/compiler/testData/loadJavaCustom/staticFinal/test.java b/compiler/testData/loadJava/compiledJava/staticFinal/test.java similarity index 100% rename from compiler/testData/loadJavaCustom/staticFinal/test.java rename to compiler/testData/loadJava/compiledJava/staticFinal/test.java diff --git a/compiler/testData/loadJavaCustom/staticFinal/expected.txt b/compiler/testData/loadJava/compiledJava/staticFinal/test.txt similarity index 100% rename from compiler/testData/loadJavaCustom/staticFinal/expected.txt rename to compiler/testData/loadJava/compiledJava/staticFinal/test.txt diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractLoadJavaTest.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractLoadJavaTest.java index 7db0318f1fa..b17c651578d 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractLoadJavaTest.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractLoadJavaTest.java @@ -69,7 +69,11 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir { checkLoadedNamespaces(txtFile, kotlinNamespace, javaNamespaceAndContext.first, javaNamespaceAndContext.second); } - protected void doTestCompiledJava(@NotNull String expectedFileName, @NotNull String... javaFileNames) throws Exception { + protected void doTestCompiledJava(@NotNull String javaFileName) throws Exception { + doTestCompiledJava(new File(javaFileName.replaceFirst("\\.java$", ".txt")), javaFileName); + } + + protected void doTestCompiledJava(@NotNull File expectedFile, @NotNull String... javaFileNames) throws Exception { JetTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea( getTestRootDisposable(), ConfigurationKind.JDK_AND_ANNOTATIONS, TestJdkKind.MOCK_JDK); @@ -79,7 +83,6 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir { return new File(s); } }); - File expectedFile = new File(expectedFileName); File tmpDir = JetTestUtils.tmpDir(expectedFile.getName()); Pair javaNamespaceAndContext diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaCustomTest.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaCustomTest.java index 4637c8e4bb1..0b958d7d222 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaCustomTest.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaCustomTest.java @@ -18,6 +18,8 @@ package org.jetbrains.jet.jvm.compiler; import org.jetbrains.annotations.NotNull; +import java.io.File; + /* LoadJavaTestGenerated should be used instead if possible. */ @@ -28,100 +30,11 @@ public final class LoadJavaCustomTest extends AbstractLoadJavaTest { public void testPackageLocalVisibility() throws Exception { String dir = PATH + "/packageLocalVisibility/simple/"; String javaDir = dir + "/java"; - doTestCompiledJava(dir + "/expected.txt", + doTestCompiledJava(new File(dir + "/expected.txt"), javaDir + "/test/JFrame.java", javaDir + "/awt/Frame.java"); } - public void testInner() throws Exception { - doSimpleTest(); - } - - public void testProtectedStaticVisibility() throws Exception { - String dir = PATH + "/protectedStaticVisibility/constructor/"; - doTestCompiledJava(dir + "ConstructorInProtectedStaticNestedClass.txt", - dir + "ConstructorInProtectedStaticNestedClass.java"); - } - - public void testProtectedPackageFun() throws Exception { - String dir = PATH + "/protectedPackageVisibility/"; - doTestCompiledJava(dir + "ProtectedPackageFun.txt", - dir + "ProtectedPackageFun.java"); - } - - public void testProtectedPackageConstructor() throws Exception { - String dir = PATH + "/protectedPackageVisibility/"; - doTestCompiledJava(dir + "ProtectedPackageConstructor.txt", - dir + "ProtectedPackageConstructor.java"); - } - - public void testProtectedPackageProperty() throws Exception { - String dir = PATH + "/protectedPackageVisibility/"; - doTestCompiledJava(dir + "ProtectedPackageProperty.txt", - dir + "ProtectedPackageProperty.java"); - } - - public void testStaticFinal() throws Exception { - String dir = "/staticFinal/"; - doTestCompiledJava(PATH + dir + "expected.txt", - PATH + dir + "test.java"); - } - - private void doSimpleTest() throws Exception { - doTestCompiledJava(PATH + "/" + getTestName(true) + ".txt", - PATH + "/" + getTestName(true) + ".java"); - } - - public void testKotlinSignatureTwoSuperclassesInconsistentGenericTypes() throws Exception { - String dir = PATH + "/kotlinSignature/"; - doTestCompiledJava(dir + "TwoSuperclassesInconsistentGenericTypes.txt", - dir + "TwoSuperclassesInconsistentGenericTypes.java"); - } - - public void testKotlinSignatureTwoSuperclassesVarargAndNot() throws Exception { - String dir = PATH + "/kotlinSignature/"; - doTestCompiledJava(dir + "TwoSuperclassesVarargAndNot.txt", - dir + "TwoSuperclassesVarargAndNot.java"); - } - - //TODO: move to LoadJavaTestGenerated when possible - public void testEnum() throws Exception { - String dir = PATH + "/enum"; - String javaDir = dir + "/java"; - doTestCompiledJava(dir + "/expected.txt", - javaDir + "/MyEnum.java"); - } - - public void testRawSuperType() throws Exception { - String dir = PATH + "/rawSuperType/"; - doTestCompiledJava(dir + "RawSuperType.txt", - dir + "RawSuperType.java"); - } - - public void testSubclassWithRawType() throws Exception { - String dir = PATH + "/subclassWithRawType/"; - doTestCompiledJava(dir + "SubclassWithRawType.txt", - dir + "SubclassWithRawType.java"); - } - - public void testArraysInSubtypes() throws Exception { - String dir = PATH + "/arraysInSubtypes/"; - doTestCompiledJava(dir + "ArraysInSubtypes.txt", - dir + "ArraysInSubtypes.java"); - } - - public void testMethodTypeParameterErased() throws Exception { - String dir = PATH + "/methodTypeParameterErased/"; - doTestCompiledJava(dir + "MethodTypeParameterErased.txt", - dir + "MethodTypeParameterErased.java"); - } - - public void testReturnInnerSubclassOfSupersInner() throws Exception { - String dir = PATH + "/returnInnerSubclassOfSupersInner/"; - doTestCompiledJava(dir + "ReturnInnerSubclassOfSupersInner.txt", - dir + "test/ReturnInnerSubclassOfSupersInner.java"); - } - public void testReturnInnerSubclassOfSupersInnerNoCompile() throws Exception { // Test is here because Java PSI used to have some differences when loading parallel generic hierarchies from cls and source code. String dir = PATH + "/returnInnerSubclassOfSupersInner/"; diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java index 7ccbf91d6cb..45ae3182046 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java @@ -30,940 +30,1070 @@ import org.jetbrains.jet.jvm.compiler.AbstractLoadJavaTest; /** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") -@TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin") -@InnerTestClasses({LoadJavaTestGenerated.Annotation.class, LoadJavaTestGenerated.Constructor.class, LoadJavaTestGenerated.JavaBean.class, LoadJavaTestGenerated.KotlinSignature.class, LoadJavaTestGenerated.Library.class, LoadJavaTestGenerated.Modality.class, LoadJavaTestGenerated.NotNull.class, LoadJavaTestGenerated.Vararg.class}) +@InnerTestClasses({LoadJavaTestGenerated.CompiledJavaCompareWithKotlin.class, LoadJavaTestGenerated.CompiledJava.class}) public class LoadJavaTestGenerated extends AbstractLoadJavaTest { - public void testAllFilesPresentInCompiledJavaCompareWithKotlin() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin"), Pattern.compile("^(.+)\\.java$"), true); - } - - @TestMetadata("ArrayTypeVariance.java") - public void testArrayTypeVariance() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ArrayTypeVariance.java"); - } - - @TestMetadata("ClassDoesNotOverrideMethod.java") - public void testClassDoesNotOverrideMethod() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassDoesNotOverrideMethod.java"); - } - - @TestMetadata("ClassWithTypeP.java") - public void testClassWithTypeP() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypeP.java"); - } - - @TestMetadata("ClassWithTypePExtendsIterableP.java") - public void testClassWithTypePExtendsIterableP() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypePExtendsIterableP.java"); - } - - @TestMetadata("ClassWithTypePP.java") - public void testClassWithTypePP() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypePP.java"); - } - - @TestMetadata("ClassWithTypePRefNext.java") - public void testClassWithTypePRefNext() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypePRefNext.java"); - } - - @TestMetadata("ClassWithTypePRefSelf.java") - public void testClassWithTypePRefSelf() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypePRefSelf.java"); - } - - @TestMetadata("ClassWithTypePRefSelfAndClass.java") - public void testClassWithTypePRefSelfAndClass() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypePRefSelfAndClass.java"); - } - - @TestMetadata("FieldAsVar.java") - public void testFieldAsVar() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/FieldAsVar.java"); - } - - @TestMetadata("FieldOfArrayType.java") - public void testFieldOfArrayType() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/FieldOfArrayType.java"); - } - - @TestMetadata("FinalFieldAsVal.java") - public void testFinalFieldAsVal() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/FinalFieldAsVal.java"); - } - - @TestMetadata("InnerClass.java") - public void testInnerClass() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/InnerClass.java"); - } - - @TestMetadata("InnerClassReferencesOuterTP.java") - public void testInnerClassReferencesOuterTP() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/InnerClassReferencesOuterTP.java"); - } - - @TestMetadata("InnerClassesInGeneric.java") - public void testInnerClassesInGeneric() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/InnerClassesInGeneric.java"); - } - - @TestMetadata("MethodReferencesOuterClassTP.java") - public void testMethodReferencesOuterClassTP() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodReferencesOuterClassTP.java"); - } - - @TestMetadata("MethodTypePOneUpperBound.java") - public void testMethodTypePOneUpperBound() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodTypePOneUpperBound.java"); - } - - @TestMetadata("MethodTypePTwoUpperBounds.java") - public void testMethodTypePTwoUpperBounds() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodTypePTwoUpperBounds.java"); - } - - @TestMetadata("MethodWithTypeP.java") - public void testMethodWithTypeP() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodWithTypeP.java"); - } - - @TestMetadata("MethodWithTypePP.java") - public void testMethodWithTypePP() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodWithTypePP.java"); - } - - @TestMetadata("MethodWithTypePRefClassP.java") - public void testMethodWithTypePRefClassP() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodWithTypePRefClassP.java"); - } - - @TestMetadata("MethosWithPRefTP.java") - public void testMethosWithPRefTP() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethosWithPRefTP.java"); - } - - @TestMetadata("MyException.java") - public void testMyException() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MyException.java"); - } - - @TestMetadata("NestedClass.java") - public void testNestedClass() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/NestedClass.java"); - } - - @TestMetadata("RemoveRedundantProjectionKind.java") - public void testRemoveRedundantProjectionKind() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/RemoveRedundantProjectionKind.java"); - } - - @TestMetadata("Simple.java") - public void testSimple() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/Simple.java"); - } - - @TestMetadata("TwoFields.java") - public void testTwoFields() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/TwoFields.java"); - } - - @TestMetadata("UnboundWildcard.java") - public void testUnboundWildcard() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/UnboundWildcard.java"); - } - - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/annotation") - public static class Annotation extends AbstractLoadJavaTest { - public void testAllFilesPresentInAnnotation() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/annotation"), Pattern.compile("^(.+)\\.java$"), true); + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin") + @InnerTestClasses({CompiledJavaCompareWithKotlin.Annotation.class, CompiledJavaCompareWithKotlin.Constructor.class, CompiledJavaCompareWithKotlin.JavaBean.class, CompiledJavaCompareWithKotlin.KotlinSignature.class, CompiledJavaCompareWithKotlin.Library.class, CompiledJavaCompareWithKotlin.Modality.class, CompiledJavaCompareWithKotlin.NotNull.class, CompiledJavaCompareWithKotlin.Vararg.class}) + public static class CompiledJavaCompareWithKotlin extends AbstractLoadJavaTest { + public void testAllFilesPresentInCompiledJavaCompareWithKotlin() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin"), Pattern.compile("^(.+)\\.java$"), true); } - @TestMetadata("AnnotatedAnnotation.java") - public void testAnnotatedAnnotation() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/annotation/AnnotatedAnnotation.java"); + @TestMetadata("ArrayTypeVariance.java") + public void testArrayTypeVariance() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ArrayTypeVariance.java"); } - @TestMetadata("AnnotatedMethod.java") - public void testAnnotatedMethod() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/annotation/AnnotatedMethod.java"); + @TestMetadata("ClassDoesNotOverrideMethod.java") + public void testClassDoesNotOverrideMethod() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassDoesNotOverrideMethod.java"); } - @TestMetadata("SimpleAnnotation.java") - public void testSimpleAnnotation() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/annotation/SimpleAnnotation.java"); + @TestMetadata("ClassWithTypeP.java") + public void testClassWithTypeP() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypeP.java"); } - } - - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/constructor") - public static class Constructor extends AbstractLoadJavaTest { - public void testAllFilesPresentInConstructor() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/constructor"), Pattern.compile("^(.+)\\.java$"), true); + @TestMetadata("ClassWithTypePExtendsIterableP.java") + public void testClassWithTypePExtendsIterableP() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypePExtendsIterableP.java"); } - @TestMetadata("ConstructorGenericDeep.java") - public void testConstructorGenericDeep() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/constructor/ConstructorGenericDeep.java"); + @TestMetadata("ClassWithTypePP.java") + public void testClassWithTypePP() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypePP.java"); } - @TestMetadata("ConstructorGenericSimple.java") - public void testConstructorGenericSimple() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/constructor/ConstructorGenericSimple.java"); + @TestMetadata("ClassWithTypePRefNext.java") + public void testClassWithTypePRefNext() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypePRefNext.java"); } - @TestMetadata("ConstructorGenericUpperBound.java") - public void testConstructorGenericUpperBound() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/constructor/ConstructorGenericUpperBound.java"); + @TestMetadata("ClassWithTypePRefSelf.java") + public void testClassWithTypePRefSelf() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypePRefSelf.java"); } - } - - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean") - public static class JavaBean extends AbstractLoadJavaTest { - public void testAllFilesPresentInJavaBean() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean"), Pattern.compile("^(.+)\\.java$"), true); + @TestMetadata("ClassWithTypePRefSelfAndClass.java") + public void testClassWithTypePRefSelfAndClass() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/ClassWithTypePRefSelfAndClass.java"); } - @TestMetadata("DifferentGetterAndSetter.java") - public void testDifferentGetterAndSetter() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/DifferentGetterAndSetter.java"); + @TestMetadata("FieldAsVar.java") + public void testFieldAsVar() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/FieldAsVar.java"); } - @TestMetadata("JavaBeanAbstractGetter.java") - public void testJavaBeanAbstractGetter() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/JavaBeanAbstractGetter.java"); + @TestMetadata("FieldOfArrayType.java") + public void testFieldOfArrayType() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/FieldOfArrayType.java"); } - @TestMetadata("JavaBeanVal.java") - public void testJavaBeanVal() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/JavaBeanVal.java"); + @TestMetadata("FinalFieldAsVal.java") + public void testFinalFieldAsVal() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/FinalFieldAsVal.java"); } - @TestMetadata("JavaBeanVar.java") - public void testJavaBeanVar() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/JavaBeanVar.java"); + @TestMetadata("InnerClass.java") + public void testInnerClass() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/InnerClass.java"); } - @TestMetadata("JavaBeanVarOfGenericType.java") - public void testJavaBeanVarOfGenericType() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/JavaBeanVarOfGenericType.java"); + @TestMetadata("InnerClassReferencesOuterTP.java") + public void testInnerClassReferencesOuterTP() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/InnerClassReferencesOuterTP.java"); } - @TestMetadata("TwoSetters.java") - public void testTwoSetters() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/TwoSetters.java"); + @TestMetadata("InnerClassesInGeneric.java") + public void testInnerClassesInGeneric() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/InnerClassesInGeneric.java"); } - } - - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature") - @InnerTestClasses({KotlinSignature.Error.class, KotlinSignature.Propagation.class}) - public static class KotlinSignature extends AbstractLoadJavaTest { - public void testAllFilesPresentInKotlinSignature() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature"), Pattern.compile("^(.+)\\.java$"), true); + @TestMetadata("MethodReferencesOuterClassTP.java") + public void testMethodReferencesOuterClassTP() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodReferencesOuterClassTP.java"); } - @TestMetadata("ArrayType.java") - public void testArrayType() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/ArrayType.java"); + @TestMetadata("MethodTypePOneUpperBound.java") + public void testMethodTypePOneUpperBound() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodTypePOneUpperBound.java"); } - @TestMetadata("ConstructorWithNewTypeParams.java") - public void testConstructorWithNewTypeParams() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/ConstructorWithNewTypeParams.java"); + @TestMetadata("MethodTypePTwoUpperBounds.java") + public void testMethodTypePTwoUpperBounds() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodTypePTwoUpperBounds.java"); } - @TestMetadata("ConstructorWithParentTypeParams.java") - public void testConstructorWithParentTypeParams() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/ConstructorWithParentTypeParams.java"); + @TestMetadata("MethodWithTypeP.java") + public void testMethodWithTypeP() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodWithTypeP.java"); } - @TestMetadata("ConstructorWithSeveralParams.java") - public void testConstructorWithSeveralParams() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/ConstructorWithSeveralParams.java"); + @TestMetadata("MethodWithTypePP.java") + public void testMethodWithTypePP() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodWithTypePP.java"); } - @TestMetadata("ConstructorWithoutParams.java") - public void testConstructorWithoutParams() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/ConstructorWithoutParams.java"); + @TestMetadata("MethodWithTypePRefClassP.java") + public void testMethodWithTypePRefClassP() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethodWithTypePRefClassP.java"); } - @TestMetadata("CustomProjectionKind.java") - public void testCustomProjectionKind() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/CustomProjectionKind.java"); + @TestMetadata("MethosWithPRefTP.java") + public void testMethosWithPRefTP() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MethosWithPRefTP.java"); } - @TestMetadata("MethodWithFunctionTypes.java") - public void testMethodWithFunctionTypes() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/MethodWithFunctionTypes.java"); + @TestMetadata("MyException.java") + public void testMyException() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/MyException.java"); } - @TestMetadata("MethodWithGenerics.java") - public void testMethodWithGenerics() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/MethodWithGenerics.java"); + @TestMetadata("NestedClass.java") + public void testNestedClass() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/NestedClass.java"); } - @TestMetadata("MethodWithMappedClasses.java") - public void testMethodWithMappedClasses() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/MethodWithMappedClasses.java"); + @TestMetadata("RemoveRedundantProjectionKind.java") + public void testRemoveRedundantProjectionKind() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/RemoveRedundantProjectionKind.java"); } - @TestMetadata("MethodWithTypeParameters.java") - public void testMethodWithTypeParameters() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/MethodWithTypeParameters.java"); + @TestMetadata("Simple.java") + public void testSimple() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/Simple.java"); } - @TestMetadata("MethodWithVararg.java") - public void testMethodWithVararg() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/MethodWithVararg.java"); + @TestMetadata("TwoFields.java") + public void testTwoFields() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/TwoFields.java"); } - @TestMetadata("PropertyArrayTypes.java") - public void testPropertyArrayTypes() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/PropertyArrayTypes.java"); + @TestMetadata("UnboundWildcard.java") + public void testUnboundWildcard() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/UnboundWildcard.java"); } - @TestMetadata("PropertyComplexTypes.java") - public void testPropertyComplexTypes() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/PropertyComplexTypes.java"); - } - - @TestMetadata("PropertySimpleType.java") - public void testPropertySimpleType() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/PropertySimpleType.java"); - } - - @TestMetadata("StarProjection.java") - public void testStarProjection() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/StarProjection.java"); - } - - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error") - public static class Error extends AbstractLoadJavaTest { - @TestMetadata("AddingNullability.java") - public void testAddingNullability() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/AddingNullability.java"); + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/annotation") + public static class Annotation extends AbstractLoadJavaTest { + public void testAllFilesPresentInAnnotation() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/annotation"), Pattern.compile("^(.+)\\.java$"), true); } - public void testAllFilesPresentInError() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error"), Pattern.compile("^(.+)\\.java$"), true); + @TestMetadata("AnnotatedAnnotation.java") + public void testAnnotatedAnnotation() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/annotation/AnnotatedAnnotation.java"); } - @TestMetadata("ConflictingProjectionKind.java") - public void testConflictingProjectionKind() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/ConflictingProjectionKind.java"); + @TestMetadata("AnnotatedMethod.java") + public void testAnnotatedMethod() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/annotation/AnnotatedMethod.java"); } - @TestMetadata("ExplicitFieldGettersAndSetters.java") - public void testExplicitFieldGettersAndSetters() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/ExplicitFieldGettersAndSetters.java"); - } - - @TestMetadata("ExtraUpperBound.java") - public void testExtraUpperBound() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/ExtraUpperBound.java"); - } - - @TestMetadata("MissingUpperBound.java") - public void testMissingUpperBound() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/MissingUpperBound.java"); - } - - @TestMetadata("NoFieldTypeRef.java") - public void testNoFieldTypeRef() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/NoFieldTypeRef.java"); - } - - @TestMetadata("NotVarargReplacedWithVararg.java") - public void testNotVarargReplacedWithVararg() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/NotVarargReplacedWithVararg.java"); - } - - @TestMetadata("RedundantProjectionKind.java") - public void testRedundantProjectionKind() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/RedundantProjectionKind.java"); - } - - @TestMetadata("ReturnTypeMissing.java") - public void testReturnTypeMissing() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/ReturnTypeMissing.java"); - } - - @TestMetadata("SyntaxError.java") - public void testSyntaxError() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/SyntaxError.java"); - } - - @TestMetadata("SyntaxErrorInFieldAnnotation.java") - public void testSyntaxErrorInFieldAnnotation() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/SyntaxErrorInFieldAnnotation.java"); - } - - @TestMetadata("VarargReplacedWithNotVararg.java") - public void testVarargReplacedWithNotVararg() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/VarargReplacedWithNotVararg.java"); - } - - @TestMetadata("WrongFieldInitializer.java") - public void testWrongFieldInitializer() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongFieldInitializer.java"); - } - - @TestMetadata("WrongFieldMutability.java") - public void testWrongFieldMutability() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongFieldMutability.java"); - } - - @TestMetadata("WrongFieldName.java") - public void testWrongFieldName() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongFieldName.java"); - } - - @TestMetadata("WrongMethodName.java") - public void testWrongMethodName() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongMethodName.java"); - } - - @TestMetadata("WrongProjectionKind.java") - public void testWrongProjectionKind() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongProjectionKind.java"); - } - - @TestMetadata("WrongReturnTypeStructure.java") - public void testWrongReturnTypeStructure() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongReturnTypeStructure.java"); - } - - @TestMetadata("WrongTypeName1.java") - public void testWrongTypeName1() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeName1.java"); - } - - @TestMetadata("WrongTypeName2.java") - public void testWrongTypeName2() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeName2.java"); - } - - @TestMetadata("WrongTypeName3.java") - public void testWrongTypeName3() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeName3.java"); - } - - @TestMetadata("WrongTypeParameterBoundStructure1.java") - public void testWrongTypeParameterBoundStructure1() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeParameterBoundStructure1.java"); - } - - @TestMetadata("WrongTypeParameterBoundStructure2.java") - public void testWrongTypeParameterBoundStructure2() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeParameterBoundStructure2.java"); - } - - @TestMetadata("WrongTypeParametersCount.java") - public void testWrongTypeParametersCount() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeParametersCount.java"); - } - - @TestMetadata("WrongValueParameterStructure1.java") - public void testWrongValueParameterStructure1() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongValueParameterStructure1.java"); - } - - @TestMetadata("WrongValueParameterStructure2.java") - public void testWrongValueParameterStructure2() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongValueParameterStructure2.java"); - } - - @TestMetadata("WrongValueParametersCount.java") - public void testWrongValueParametersCount() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongValueParametersCount.java"); + @TestMetadata("SimpleAnnotation.java") + public void testSimpleAnnotation() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/annotation/SimpleAnnotation.java"); } } - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation") - @InnerTestClasses({Propagation.Parameter.class, Propagation.Return.class, Propagation.TypeParameter.class}) - public static class Propagation extends AbstractLoadJavaTest { - public void testAllFilesPresentInPropagation() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.java$"), true); + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/constructor") + public static class Constructor extends AbstractLoadJavaTest { + public void testAllFilesPresentInConstructor() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/constructor"), Pattern.compile("^(.+)\\.java$"), true); } - @TestMetadata("PropagateTypeArgumentNullable.java") - public void testPropagateTypeArgumentNullable() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/PropagateTypeArgumentNullable.java"); + @TestMetadata("ConstructorGenericDeep.java") + public void testConstructorGenericDeep() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/constructor/ConstructorGenericDeep.java"); } - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter") - public static class Parameter extends AbstractLoadJavaTest { - public void testAllFilesPresentInParameter() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.java$"), true); + @TestMetadata("ConstructorGenericSimple.java") + public void testConstructorGenericSimple() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/constructor/ConstructorGenericSimple.java"); + } + + @TestMetadata("ConstructorGenericUpperBound.java") + public void testConstructorGenericUpperBound() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/constructor/ConstructorGenericUpperBound.java"); + } + + } + + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean") + public static class JavaBean extends AbstractLoadJavaTest { + public void testAllFilesPresentInJavaBean() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("DifferentGetterAndSetter.java") + public void testDifferentGetterAndSetter() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/DifferentGetterAndSetter.java"); + } + + @TestMetadata("JavaBeanAbstractGetter.java") + public void testJavaBeanAbstractGetter() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/JavaBeanAbstractGetter.java"); + } + + @TestMetadata("JavaBeanVal.java") + public void testJavaBeanVal() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/JavaBeanVal.java"); + } + + @TestMetadata("JavaBeanVar.java") + public void testJavaBeanVar() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/JavaBeanVar.java"); + } + + @TestMetadata("JavaBeanVarOfGenericType.java") + public void testJavaBeanVarOfGenericType() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/JavaBeanVarOfGenericType.java"); + } + + @TestMetadata("TwoSetters.java") + public void testTwoSetters() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/javaBean/TwoSetters.java"); + } + + } + + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature") + @InnerTestClasses({KotlinSignature.Error.class, KotlinSignature.Propagation.class}) + public static class KotlinSignature extends AbstractLoadJavaTest { + public void testAllFilesPresentInKotlinSignature() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ArrayType.java") + public void testArrayType() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/ArrayType.java"); + } + + @TestMetadata("ConstructorWithNewTypeParams.java") + public void testConstructorWithNewTypeParams() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/ConstructorWithNewTypeParams.java"); + } + + @TestMetadata("ConstructorWithParentTypeParams.java") + public void testConstructorWithParentTypeParams() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/ConstructorWithParentTypeParams.java"); + } + + @TestMetadata("ConstructorWithSeveralParams.java") + public void testConstructorWithSeveralParams() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/ConstructorWithSeveralParams.java"); + } + + @TestMetadata("ConstructorWithoutParams.java") + public void testConstructorWithoutParams() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/ConstructorWithoutParams.java"); + } + + @TestMetadata("CustomProjectionKind.java") + public void testCustomProjectionKind() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/CustomProjectionKind.java"); + } + + @TestMetadata("MethodWithFunctionTypes.java") + public void testMethodWithFunctionTypes() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/MethodWithFunctionTypes.java"); + } + + @TestMetadata("MethodWithGenerics.java") + public void testMethodWithGenerics() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/MethodWithGenerics.java"); + } + + @TestMetadata("MethodWithMappedClasses.java") + public void testMethodWithMappedClasses() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/MethodWithMappedClasses.java"); + } + + @TestMetadata("MethodWithTypeParameters.java") + public void testMethodWithTypeParameters() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/MethodWithTypeParameters.java"); + } + + @TestMetadata("MethodWithVararg.java") + public void testMethodWithVararg() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/MethodWithVararg.java"); + } + + @TestMetadata("PropertyArrayTypes.java") + public void testPropertyArrayTypes() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/PropertyArrayTypes.java"); + } + + @TestMetadata("PropertyComplexTypes.java") + public void testPropertyComplexTypes() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/PropertyComplexTypes.java"); + } + + @TestMetadata("PropertySimpleType.java") + public void testPropertySimpleType() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/PropertySimpleType.java"); + } + + @TestMetadata("StarProjection.java") + public void testStarProjection() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/StarProjection.java"); + } + + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error") + public static class Error extends AbstractLoadJavaTest { + @TestMetadata("AddingNullability.java") + public void testAddingNullability() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/AddingNullability.java"); } - @TestMetadata("ChangeProjectionKind1.java") - public void testChangeProjectionKind1() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/ChangeProjectionKind1.java"); + public void testAllFilesPresentInError() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error"), Pattern.compile("^(.+)\\.java$"), true); } - @TestMetadata("ChangeProjectionKind2.java") - public void testChangeProjectionKind2() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/ChangeProjectionKind2.java"); + @TestMetadata("ConflictingProjectionKind.java") + public void testConflictingProjectionKind() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/ConflictingProjectionKind.java"); } - @TestMetadata("DeeplySubstitutedClassParameter.java") - public void testDeeplySubstitutedClassParameter() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.java"); + @TestMetadata("ExplicitFieldGettersAndSetters.java") + public void testExplicitFieldGettersAndSetters() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/ExplicitFieldGettersAndSetters.java"); } - @TestMetadata("DeeplySubstitutedClassParameter2.java") - public void testDeeplySubstitutedClassParameter2() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.java"); + @TestMetadata("ExtraUpperBound.java") + public void testExtraUpperBound() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/ExtraUpperBound.java"); } - @TestMetadata("InheritMutability.java") - public void testInheritMutability() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritMutability.java"); + @TestMetadata("MissingUpperBound.java") + public void testMissingUpperBound() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/MissingUpperBound.java"); } - @TestMetadata("InheritNotVararg.java") - public void testInheritNotVararg() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritNotVararg.java"); + @TestMetadata("NoFieldTypeRef.java") + public void testNoFieldTypeRef() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/NoFieldTypeRef.java"); } - @TestMetadata("InheritNotVarargInteger.java") - public void testInheritNotVarargInteger() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritNotVarargInteger.java"); + @TestMetadata("NotVarargReplacedWithVararg.java") + public void testNotVarargReplacedWithVararg() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/NotVarargReplacedWithVararg.java"); } - @TestMetadata("InheritNotVarargNotNull.java") - public void testInheritNotVarargNotNull() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.java"); + @TestMetadata("RedundantProjectionKind.java") + public void testRedundantProjectionKind() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/RedundantProjectionKind.java"); } - @TestMetadata("InheritNotVarargPrimitive.java") - public void testInheritNotVarargPrimitive() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.java"); + @TestMetadata("ReturnTypeMissing.java") + public void testReturnTypeMissing() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/ReturnTypeMissing.java"); } - @TestMetadata("InheritNullability.java") - public void testInheritNullability() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritNullability.java"); + @TestMetadata("SyntaxError.java") + public void testSyntaxError() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/SyntaxError.java"); } - @TestMetadata("InheritProjectionKind.java") - public void testInheritProjectionKind() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritProjectionKind.java"); + @TestMetadata("SyntaxErrorInFieldAnnotation.java") + public void testSyntaxErrorInFieldAnnotation() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/SyntaxErrorInFieldAnnotation.java"); } - @TestMetadata("InheritReadOnliness.java") - public void testInheritReadOnliness() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritReadOnliness.java"); + @TestMetadata("VarargReplacedWithNotVararg.java") + public void testVarargReplacedWithNotVararg() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/VarargReplacedWithNotVararg.java"); } - @TestMetadata("InheritVararg.java") - public void testInheritVararg() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritVararg.java"); + @TestMetadata("WrongFieldInitializer.java") + public void testWrongFieldInitializer() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongFieldInitializer.java"); } - @TestMetadata("InheritVarargInteger.java") - public void testInheritVarargInteger() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritVarargInteger.java"); + @TestMetadata("WrongFieldMutability.java") + public void testWrongFieldMutability() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongFieldMutability.java"); } - @TestMetadata("InheritVarargNotNull.java") - public void testInheritVarargNotNull() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritVarargNotNull.java"); + @TestMetadata("WrongFieldName.java") + public void testWrongFieldName() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongFieldName.java"); } - @TestMetadata("InheritVarargPrimitive.java") - public void testInheritVarargPrimitive() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritVarargPrimitive.java"); + @TestMetadata("WrongMethodName.java") + public void testWrongMethodName() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongMethodName.java"); } - @TestMetadata("Kt3302.java") - public void testKt3302() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/Kt3302.java"); + @TestMetadata("WrongProjectionKind.java") + public void testWrongProjectionKind() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongProjectionKind.java"); } - @TestMetadata("MutableToReadOnly.java") - public void testMutableToReadOnly() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/MutableToReadOnly.java"); + @TestMetadata("WrongReturnTypeStructure.java") + public void testWrongReturnTypeStructure() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongReturnTypeStructure.java"); } - @TestMetadata("NotNullToNullable.java") - public void testNotNullToNullable() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/NotNullToNullable.java"); + @TestMetadata("WrongTypeName1.java") + public void testWrongTypeName1() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeName1.java"); } - @TestMetadata("NullableToNotNull.java") - public void testNullableToNotNull() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/NullableToNotNull.java"); + @TestMetadata("WrongTypeName2.java") + public void testWrongTypeName2() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeName2.java"); } - @TestMetadata("NullableToNotNullKotlinSignature.java") - public void testNullableToNotNullKotlinSignature() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.java"); + @TestMetadata("WrongTypeName3.java") + public void testWrongTypeName3() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeName3.java"); } - @TestMetadata("OverrideWithErasedParameter.java") - public void testOverrideWithErasedParameter() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.java"); + @TestMetadata("WrongTypeParameterBoundStructure1.java") + public void testWrongTypeParameterBoundStructure1() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeParameterBoundStructure1.java"); } - @TestMetadata("ReadOnlyToMutable.java") - public void testReadOnlyToMutable() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/ReadOnlyToMutable.java"); + @TestMetadata("WrongTypeParameterBoundStructure2.java") + public void testWrongTypeParameterBoundStructure2() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeParameterBoundStructure2.java"); } - @TestMetadata("SubclassFromGenericAndNot.java") - public void testSubclassFromGenericAndNot() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.java"); + @TestMetadata("WrongTypeParametersCount.java") + public void testWrongTypeParametersCount() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongTypeParametersCount.java"); } - @TestMetadata("SubstitutedClassParameter.java") - public void testSubstitutedClassParameter() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/SubstitutedClassParameter.java"); + @TestMetadata("WrongValueParameterStructure1.java") + public void testWrongValueParameterStructure1() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongValueParameterStructure1.java"); } - @TestMetadata("SubstitutedClassParameters.java") - public void testSubstitutedClassParameters() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/SubstitutedClassParameters.java"); + @TestMetadata("WrongValueParameterStructure2.java") + public void testWrongValueParameterStructure2() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongValueParameterStructure2.java"); + } + + @TestMetadata("WrongValueParametersCount.java") + public void testWrongValueParametersCount() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/error/WrongValueParametersCount.java"); } } - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return") - public static class Return extends AbstractLoadJavaTest { - @TestMetadata("AddNotNullJavaSubtype.java") - public void testAddNotNullJavaSubtype() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java"); + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation") + @InnerTestClasses({Propagation.Parameter.class, Propagation.Return.class, Propagation.TypeParameter.class}) + public static class Propagation extends AbstractLoadJavaTest { + public void testAllFilesPresentInPropagation() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.java$"), true); } - @TestMetadata("AddNotNullSameJavaType.java") - public void testAddNotNullSameJavaType() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNotNullSameJavaType.java"); + @TestMetadata("PropagateTypeArgumentNullable.java") + public void testPropagateTypeArgumentNullable() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/PropagateTypeArgumentNullable.java"); } - @TestMetadata("AddNullabilityJavaSubtype.java") - public void testAddNullabilityJavaSubtype() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java"); + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter") + public static class Parameter extends AbstractLoadJavaTest { + public void testAllFilesPresentInParameter() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ChangeProjectionKind1.java") + public void testChangeProjectionKind1() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/ChangeProjectionKind1.java"); + } + + @TestMetadata("ChangeProjectionKind2.java") + public void testChangeProjectionKind2() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/ChangeProjectionKind2.java"); + } + + @TestMetadata("DeeplySubstitutedClassParameter.java") + public void testDeeplySubstitutedClassParameter() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.java"); + } + + @TestMetadata("DeeplySubstitutedClassParameter2.java") + public void testDeeplySubstitutedClassParameter2() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.java"); + } + + @TestMetadata("InheritMutability.java") + public void testInheritMutability() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritMutability.java"); + } + + @TestMetadata("InheritNotVararg.java") + public void testInheritNotVararg() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritNotVararg.java"); + } + + @TestMetadata("InheritNotVarargInteger.java") + public void testInheritNotVarargInteger() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritNotVarargInteger.java"); + } + + @TestMetadata("InheritNotVarargNotNull.java") + public void testInheritNotVarargNotNull() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.java"); + } + + @TestMetadata("InheritNotVarargPrimitive.java") + public void testInheritNotVarargPrimitive() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.java"); + } + + @TestMetadata("InheritNullability.java") + public void testInheritNullability() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritNullability.java"); + } + + @TestMetadata("InheritProjectionKind.java") + public void testInheritProjectionKind() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritProjectionKind.java"); + } + + @TestMetadata("InheritReadOnliness.java") + public void testInheritReadOnliness() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritReadOnliness.java"); + } + + @TestMetadata("InheritVararg.java") + public void testInheritVararg() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritVararg.java"); + } + + @TestMetadata("InheritVarargInteger.java") + public void testInheritVarargInteger() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritVarargInteger.java"); + } + + @TestMetadata("InheritVarargNotNull.java") + public void testInheritVarargNotNull() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritVarargNotNull.java"); + } + + @TestMetadata("InheritVarargPrimitive.java") + public void testInheritVarargPrimitive() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/InheritVarargPrimitive.java"); + } + + @TestMetadata("Kt3302.java") + public void testKt3302() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/Kt3302.java"); + } + + @TestMetadata("MutableToReadOnly.java") + public void testMutableToReadOnly() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/MutableToReadOnly.java"); + } + + @TestMetadata("NotNullToNullable.java") + public void testNotNullToNullable() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/NotNullToNullable.java"); + } + + @TestMetadata("NullableToNotNull.java") + public void testNullableToNotNull() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/NullableToNotNull.java"); + } + + @TestMetadata("NullableToNotNullKotlinSignature.java") + public void testNullableToNotNullKotlinSignature() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.java"); + } + + @TestMetadata("OverrideWithErasedParameter.java") + public void testOverrideWithErasedParameter() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.java"); + } + + @TestMetadata("ReadOnlyToMutable.java") + public void testReadOnlyToMutable() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/ReadOnlyToMutable.java"); + } + + @TestMetadata("SubclassFromGenericAndNot.java") + public void testSubclassFromGenericAndNot() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.java"); + } + + @TestMetadata("SubstitutedClassParameter.java") + public void testSubstitutedClassParameter() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/SubstitutedClassParameter.java"); + } + + @TestMetadata("SubstitutedClassParameters.java") + public void testSubstitutedClassParameters() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/parameter/SubstitutedClassParameters.java"); + } + } - @TestMetadata("AddNullabilitySameGenericType1.java") - public void testAddNullabilitySameGenericType1() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java"); + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return") + public static class Return extends AbstractLoadJavaTest { + @TestMetadata("AddNotNullJavaSubtype.java") + public void testAddNotNullJavaSubtype() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java"); + } + + @TestMetadata("AddNotNullSameJavaType.java") + public void testAddNotNullSameJavaType() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNotNullSameJavaType.java"); + } + + @TestMetadata("AddNullabilityJavaSubtype.java") + public void testAddNullabilityJavaSubtype() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java"); + } + + @TestMetadata("AddNullabilitySameGenericType1.java") + public void testAddNullabilitySameGenericType1() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java"); + } + + @TestMetadata("AddNullabilitySameGenericType2.java") + public void testAddNullabilitySameGenericType2() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java"); + } + + @TestMetadata("AddNullabilitySameJavaType.java") + public void testAddNullabilitySameJavaType() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java"); + } + + public void testAllFilesPresentInReturn() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("CantMakeImmutableInSubclass.java") + public void testCantMakeImmutableInSubclass() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.java"); + } + + @TestMetadata("DeeplySubstitutedClassParameter.java") + public void testDeeplySubstitutedClassParameter() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.java"); + } + + @TestMetadata("DeeplySubstitutedClassParameter2.java") + public void testDeeplySubstitutedClassParameter2() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.java"); + } + + @TestMetadata("HalfSubstitutedTypeParameters.java") + public void testHalfSubstitutedTypeParameters() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.java"); + } + + @TestMetadata("InheritNullabilityGenericSubclassSimple.java") + public void testInheritNullabilityGenericSubclassSimple() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java"); + } + + @TestMetadata("InheritNullabilityJavaSubtype.java") + public void testInheritNullabilityJavaSubtype() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java"); + } + + @TestMetadata("InheritNullabilitySameGenericType.java") + public void testInheritNullabilitySameGenericType() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java"); + } + + @TestMetadata("InheritNullabilitySameJavaType.java") + public void testInheritNullabilitySameJavaType() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java"); + } + + @TestMetadata("InheritProjectionKind.java") + public void testInheritProjectionKind() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritProjectionKind.java"); + } + + @TestMetadata("InheritReadOnlinessOfArgument.java") + public void testInheritReadOnlinessOfArgument() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java"); + } + + @TestMetadata("InheritReadOnlinessSameClass.java") + public void testInheritReadOnlinessSameClass() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java"); + } + + @TestMetadata("InheritReadOnlinessSubclass.java") + public void testInheritReadOnlinessSubclass() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java"); + } + + @TestMetadata("SameProjectionKind.java") + public void testSameProjectionKind() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SameProjectionKind.java"); + } + + @TestMetadata("SubclassFromGenericAndNot.java") + public void testSubclassFromGenericAndNot() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SubclassFromGenericAndNot.java"); + } + + @TestMetadata("SubclassOfCollection.java") + public void testSubclassOfCollection() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SubclassOfCollection.java"); + } + + @TestMetadata("SubclassOfMapEntry.java") + public void testSubclassOfMapEntry() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SubclassOfMapEntry.java"); + } + + @TestMetadata("SubstitutedClassParameter.java") + public void testSubstitutedClassParameter() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SubstitutedClassParameter.java"); + } + + @TestMetadata("SubstitutedClassParameters.java") + public void testSubstitutedClassParameters() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SubstitutedClassParameters.java"); + } + + @TestMetadata("TwoSuperclassesConflictingProjectionKinds.java") + public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.java"); + } + + @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.java") + public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java"); + } + + @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.java") + public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java"); + } + + @TestMetadata("TwoSuperclassesMutableAndNot.java") + public void testTwoSuperclassesMutableAndNot() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.java"); + } + + @TestMetadata("TwoSuperclassesReturnJavaSubtype.java") + public void testTwoSuperclassesReturnJavaSubtype() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java"); + } + + @TestMetadata("TwoSuperclassesReturnSameJavaType.java") + public void testTwoSuperclassesReturnSameJavaType() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java"); + } + + @TestMetadata("TwoSuperclassesSupplementNotNull.java") + public void testTwoSuperclassesSupplementNotNull() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.java"); + } + + @TestMetadata("TypeParamOfClass.java") + public void testTypeParamOfClass() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TypeParamOfClass.java"); + } + + @TestMetadata("TypeParamOfClassSubstituted.java") + public void testTypeParamOfClassSubstituted() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.java"); + } + + @TestMetadata("TypeParamOfFun.java") + public void testTypeParamOfFun() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TypeParamOfFun.java"); + } + } - @TestMetadata("AddNullabilitySameGenericType2.java") - public void testAddNullabilitySameGenericType2() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java"); + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter") + public static class TypeParameter extends AbstractLoadJavaTest { + public void testAllFilesPresentInTypeParameter() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("InheritMutability.java") + public void testInheritMutability() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/InheritMutability.java"); + } + + @TestMetadata("InheritNullability.java") + public void testInheritNullability() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/InheritNullability.java"); + } + + @TestMetadata("InheritReadOnliness.java") + public void testInheritReadOnliness() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/InheritReadOnliness.java"); + } + + @TestMetadata("TwoBounds.java") + public void testTwoBounds() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/TwoBounds.java"); + } + + @TestMetadata("TwoSuperclasses.java") + public void testTwoSuperclasses() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/TwoSuperclasses.java"); + } + + @TestMetadata("TwoTypeParameters.java") + public void testTwoTypeParameters() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/TwoTypeParameters.java"); + } + + @TestMetadata("UseParameterAsUpperBound.java") + public void testUseParameterAsUpperBound() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.java"); + } + + @TestMetadata("UseParameterInUpperBound.java") + public void testUseParameterInUpperBound() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.java"); + } + + @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.java") + public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.java"); + } + } - @TestMetadata("AddNullabilitySameJavaType.java") - public void testAddNullabilitySameJavaType() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java"); + public static Test innerSuite() { + TestSuite suite = new TestSuite("Propagation"); + suite.addTestSuite(Propagation.class); + suite.addTestSuite(Parameter.class); + suite.addTestSuite(Return.class); + suite.addTestSuite(TypeParameter.class); + return suite; } - - public void testAllFilesPresentInReturn() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return"), Pattern.compile("^(.+)\\.java$"), true); - } - - @TestMetadata("CantMakeImmutableInSubclass.java") - public void testCantMakeImmutableInSubclass() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.java"); - } - - @TestMetadata("DeeplySubstitutedClassParameter.java") - public void testDeeplySubstitutedClassParameter() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.java"); - } - - @TestMetadata("DeeplySubstitutedClassParameter2.java") - public void testDeeplySubstitutedClassParameter2() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.java"); - } - - @TestMetadata("HalfSubstitutedTypeParameters.java") - public void testHalfSubstitutedTypeParameters() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.java"); - } - - @TestMetadata("InheritNullabilityGenericSubclassSimple.java") - public void testInheritNullabilityGenericSubclassSimple() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java"); - } - - @TestMetadata("InheritNullabilityJavaSubtype.java") - public void testInheritNullabilityJavaSubtype() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java"); - } - - @TestMetadata("InheritNullabilitySameGenericType.java") - public void testInheritNullabilitySameGenericType() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java"); - } - - @TestMetadata("InheritNullabilitySameJavaType.java") - public void testInheritNullabilitySameJavaType() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java"); - } - - @TestMetadata("InheritProjectionKind.java") - public void testInheritProjectionKind() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritProjectionKind.java"); - } - - @TestMetadata("InheritReadOnlinessOfArgument.java") - public void testInheritReadOnlinessOfArgument() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java"); - } - - @TestMetadata("InheritReadOnlinessSameClass.java") - public void testInheritReadOnlinessSameClass() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java"); - } - - @TestMetadata("InheritReadOnlinessSubclass.java") - public void testInheritReadOnlinessSubclass() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java"); - } - - @TestMetadata("SameProjectionKind.java") - public void testSameProjectionKind() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SameProjectionKind.java"); - } - - @TestMetadata("SubclassFromGenericAndNot.java") - public void testSubclassFromGenericAndNot() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SubclassFromGenericAndNot.java"); - } - - @TestMetadata("SubclassOfCollection.java") - public void testSubclassOfCollection() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SubclassOfCollection.java"); - } - - @TestMetadata("SubclassOfMapEntry.java") - public void testSubclassOfMapEntry() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SubclassOfMapEntry.java"); - } - - @TestMetadata("SubstitutedClassParameter.java") - public void testSubstitutedClassParameter() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SubstitutedClassParameter.java"); - } - - @TestMetadata("SubstitutedClassParameters.java") - public void testSubstitutedClassParameters() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/SubstitutedClassParameters.java"); - } - - @TestMetadata("TwoSuperclassesConflictingProjectionKinds.java") - public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.java"); - } - - @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.java") - public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java"); - } - - @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.java") - public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java"); - } - - @TestMetadata("TwoSuperclassesMutableAndNot.java") - public void testTwoSuperclassesMutableAndNot() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.java"); - } - - @TestMetadata("TwoSuperclassesReturnJavaSubtype.java") - public void testTwoSuperclassesReturnJavaSubtype() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java"); - } - - @TestMetadata("TwoSuperclassesReturnSameJavaType.java") - public void testTwoSuperclassesReturnSameJavaType() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java"); - } - - @TestMetadata("TwoSuperclassesSupplementNotNull.java") - public void testTwoSuperclassesSupplementNotNull() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.java"); - } - - @TestMetadata("TypeParamOfClass.java") - public void testTypeParamOfClass() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TypeParamOfClass.java"); - } - - @TestMetadata("TypeParamOfClassSubstituted.java") - public void testTypeParamOfClassSubstituted() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.java"); - } - - @TestMetadata("TypeParamOfFun.java") - public void testTypeParamOfFun() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/return/TypeParamOfFun.java"); - } - - } - - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter") - public static class TypeParameter extends AbstractLoadJavaTest { - public void testAllFilesPresentInTypeParameter() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.java$"), true); - } - - @TestMetadata("InheritMutability.java") - public void testInheritMutability() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/InheritMutability.java"); - } - - @TestMetadata("InheritNullability.java") - public void testInheritNullability() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/InheritNullability.java"); - } - - @TestMetadata("InheritReadOnliness.java") - public void testInheritReadOnliness() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/InheritReadOnliness.java"); - } - - @TestMetadata("TwoBounds.java") - public void testTwoBounds() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/TwoBounds.java"); - } - - @TestMetadata("TwoSuperclasses.java") - public void testTwoSuperclasses() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/TwoSuperclasses.java"); - } - - @TestMetadata("TwoTypeParameters.java") - public void testTwoTypeParameters() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/TwoTypeParameters.java"); - } - - @TestMetadata("UseParameterAsUpperBound.java") - public void testUseParameterAsUpperBound() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.java"); - } - - @TestMetadata("UseParameterInUpperBound.java") - public void testUseParameterInUpperBound() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.java"); - } - - @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.java") - public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.java"); - } - } public static Test innerSuite() { - TestSuite suite = new TestSuite("Propagation"); - suite.addTestSuite(Propagation.class); - suite.addTestSuite(Parameter.class); - suite.addTestSuite(Return.class); - suite.addTestSuite(TypeParameter.class); + TestSuite suite = new TestSuite("KotlinSignature"); + suite.addTestSuite(KotlinSignature.class); + suite.addTestSuite(Error.class); + suite.addTest(Propagation.innerSuite()); return suite; } } + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/library") + public static class Library extends AbstractLoadJavaTest { + public void testAllFilesPresentInLibrary() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/library"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("LoadIterable.java") + public void testLoadIterable() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/library/LoadIterable.java"); + } + + @TestMetadata("LoadIterator.java") + public void testLoadIterator() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/library/LoadIterator.java"); + } + + } + + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/modality") + public static class Modality extends AbstractLoadJavaTest { + public void testAllFilesPresentInModality() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/modality"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ModalityOfFakeOverrides.java") + public void testModalityOfFakeOverrides() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/modality/ModalityOfFakeOverrides.java"); + } + + } + + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull") + public static class NotNull extends AbstractLoadJavaTest { + public void testAllFilesPresentInNotNull() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("NotNullField.java") + public void testNotNullField() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull/NotNullField.java"); + } + + @TestMetadata("NotNullMethod.java") + public void testNotNullMethod() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull/NotNullMethod.java"); + } + + @TestMetadata("NotNullParameter.java") + public void testNotNullParameter() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull/NotNullParameter.java"); + } + + } + + @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/vararg") + public static class Vararg extends AbstractLoadJavaTest { + public void testAllFilesPresentInVararg() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/vararg"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("VarargInt.java") + public void testVarargInt() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/vararg/VarargInt.java"); + } + + @TestMetadata("VarargString.java") + public void testVarargString() throws Exception { + doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/vararg/VarargString.java"); + } + + } + public static Test innerSuite() { - TestSuite suite = new TestSuite("KotlinSignature"); - suite.addTestSuite(KotlinSignature.class); - suite.addTestSuite(Error.class); - suite.addTest(Propagation.innerSuite()); + TestSuite suite = new TestSuite("CompiledJavaCompareWithKotlin"); + suite.addTestSuite(CompiledJavaCompareWithKotlin.class); + suite.addTestSuite(Annotation.class); + suite.addTestSuite(Constructor.class); + suite.addTestSuite(JavaBean.class); + suite.addTest(KotlinSignature.innerSuite()); + suite.addTestSuite(Library.class); + suite.addTestSuite(Modality.class); + suite.addTestSuite(NotNull.class); + suite.addTestSuite(Vararg.class); return suite; } } - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/library") - public static class Library extends AbstractLoadJavaTest { - public void testAllFilesPresentInLibrary() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/library"), Pattern.compile("^(.+)\\.java$"), true); + @TestMetadata("compiler/testData/loadJava/compiledJava") + @InnerTestClasses({CompiledJava.ProtectedPackage.class, CompiledJava.ProtectedStatic.class, CompiledJava.SignaturePropagation.class, CompiledJava.StaticFinal.class}) + public static class CompiledJava extends AbstractLoadJavaTest { + public void testAllFilesPresentInCompiledJava() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJava"), Pattern.compile("^(.+)\\.java$"), true); } - @TestMetadata("LoadIterable.java") - public void testLoadIterable() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/library/LoadIterable.java"); + @TestMetadata("inner.java") + public void testInner() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/inner.java"); } - @TestMetadata("LoadIterator.java") - public void testLoadIterator() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/library/LoadIterator.java"); + @TestMetadata("MyEnum.java") + public void testMyEnum() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/MyEnum.java"); } - } - - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/modality") - public static class Modality extends AbstractLoadJavaTest { - public void testAllFilesPresentInModality() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/modality"), Pattern.compile("^(.+)\\.java$"), true); + @TestMetadata("compiler/testData/loadJava/compiledJava/protectedPackage") + public static class ProtectedPackage extends AbstractLoadJavaTest { + public void testAllFilesPresentInProtectedPackage() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJava/protectedPackage"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ProtectedPackageConstructor.java") + public void testProtectedPackageConstructor() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java"); + } + + @TestMetadata("ProtectedPackageFun.java") + public void testProtectedPackageFun() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java"); + } + + @TestMetadata("ProtectedPackageProperty.java") + public void testProtectedPackageProperty() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java"); + } + } - @TestMetadata("ModalityOfFakeOverrides.java") - public void testModalityOfFakeOverrides() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/modality/ModalityOfFakeOverrides.java"); + @TestMetadata("compiler/testData/loadJava/compiledJava/protectedStatic") + public static class ProtectedStatic extends AbstractLoadJavaTest { + public void testAllFilesPresentInProtectedStatic() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJava/protectedStatic"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ConstructorInProtectedStaticNestedClass.java") + public void testConstructorInProtectedStaticNestedClass() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java"); + } + } - } - - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull") - public static class NotNull extends AbstractLoadJavaTest { - public void testAllFilesPresentInNotNull() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull"), Pattern.compile("^(.+)\\.java$"), true); + @TestMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation") + public static class SignaturePropagation extends AbstractLoadJavaTest { + public void testAllFilesPresentInSignaturePropagation() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJava/signaturePropagation"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ArraysInSubtypes.java") + public void testArraysInSubtypes() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java"); + } + + @TestMetadata("MethodTypeParameterErased.java") + public void testMethodTypeParameterErased() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java"); + } + + @TestMetadata("RawSuperType.java") + public void testRawSuperType() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java"); + } + + @TestMetadata("ReturnInnerSubclassOfSupersInner.java") + public void testReturnInnerSubclassOfSupersInner() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java"); + } + + @TestMetadata("SubclassWithRawType.java") + public void testSubclassWithRawType() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java"); + } + + @TestMetadata("TwoSuperclassesInconsistentGenericTypes.java") + public void testTwoSuperclassesInconsistentGenericTypes() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java"); + } + + @TestMetadata("TwoSuperclassesVarargAndNot.java") + public void testTwoSuperclassesVarargAndNot() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.java"); + } + } - @TestMetadata("NotNullField.java") - public void testNotNullField() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull/NotNullField.java"); + @TestMetadata("compiler/testData/loadJava/compiledJava/staticFinal") + public static class StaticFinal extends AbstractLoadJavaTest { + public void testAllFilesPresentInStaticFinal() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJava/staticFinal"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("test.java") + public void testTest() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/staticFinal/test.java"); + } + } - @TestMetadata("NotNullMethod.java") - public void testNotNullMethod() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull/NotNullMethod.java"); + public static Test innerSuite() { + TestSuite suite = new TestSuite("CompiledJava"); + suite.addTestSuite(CompiledJava.class); + suite.addTestSuite(ProtectedPackage.class); + suite.addTestSuite(ProtectedStatic.class); + suite.addTestSuite(SignaturePropagation.class); + suite.addTestSuite(StaticFinal.class); + return suite; } - - @TestMetadata("NotNullParameter.java") - public void testNotNullParameter() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull/NotNullParameter.java"); - } - - } - - @TestMetadata("compiler/testData/loadJava/compiledJavaCompareWithKotlin/vararg") - public static class Vararg extends AbstractLoadJavaTest { - public void testAllFilesPresentInVararg() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/compiledJavaCompareWithKotlin/vararg"), Pattern.compile("^(.+)\\.java$"), true); - } - - @TestMetadata("VarargInt.java") - public void testVarargInt() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/vararg/VarargInt.java"); - } - - @TestMetadata("VarargString.java") - public void testVarargString() throws Exception { - doTest("compiler/testData/loadJava/compiledJavaCompareWithKotlin/vararg/VarargString.java"); - } - } public static Test suite() { TestSuite suite = new TestSuite("LoadJavaTestGenerated"); - suite.addTestSuite(LoadJavaTestGenerated.class); - suite.addTestSuite(Annotation.class); - suite.addTestSuite(Constructor.class); - suite.addTestSuite(JavaBean.class); - suite.addTest(KotlinSignature.innerSuite()); - suite.addTestSuite(Library.class); - suite.addTestSuite(Modality.class); - suite.addTestSuite(NotNull.class); - suite.addTestSuite(Vararg.class); + suite.addTest(CompiledJavaCompareWithKotlin.innerSuite()); + suite.addTest(CompiledJava.innerSuite()); return suite; } } diff --git a/generators/org/jetbrains/jet/generators/tests/GenerateTests.java b/generators/org/jetbrains/jet/generators/tests/GenerateTests.java index 6c2dcaebdd8..6aa1a15abb7 100644 --- a/generators/org/jetbrains/jet/generators/tests/GenerateTests.java +++ b/generators/org/jetbrains/jet/generators/tests/GenerateTests.java @@ -147,7 +147,8 @@ public class GenerateTests { "compiler/tests/", "LoadJavaTestGenerated", AbstractLoadJavaTest.class, - testModel("compiler/testData/loadJava/compiledJavaCompareWithKotlin", true, "java", "doTest") + testModel("compiler/testData/loadJava/compiledJavaCompareWithKotlin", true, "java", "doTest"), + testModel("compiler/testData/loadJava/compiledJava", true, "java", "doTestCompiledJava") ); generateTest(