diff --git a/compiler/tests/org/jetbrains/jet/checkers/AbstractJetDiagnosticsTest.java b/compiler/tests/org/jetbrains/jet/checkers/AbstractJetDiagnosticsTest.java index c2aaf7b07df..12ce468fb24 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/AbstractJetDiagnosticsTest.java +++ b/compiler/tests/org/jetbrains/jet/checkers/AbstractJetDiagnosticsTest.java @@ -188,8 +188,7 @@ public abstract class AbstractJetDiagnosticsTest extends JetLiteFixture { new SimpleTestClassModel(new File("compiler/testData/diagnostics/tests"), true, "kt", "doTest"), new SimpleTestClassModel(new File("compiler/testData/diagnostics/tests/script"), true, "ktscript", "doTest") ), - AbstractJetDiagnosticsTest.class, - TestGenerator.TargetTestFrameworks.JUNIT_3 + AbstractJetDiagnosticsTest.class ).generateAndSave(); } diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractReadJavaBinaryClassTest.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractReadJavaBinaryClassTest.java index cf3f8afd2cc..3abde7bf6ed 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractReadJavaBinaryClassTest.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractReadJavaBinaryClassTest.java @@ -120,8 +120,7 @@ public abstract class AbstractReadJavaBinaryClassTest extends TestCaseWithTmpdir Arrays.asList( new SimpleTestClassModel(new File("compiler/testData/readJavaBinaryClass"), true, extension, "doTest") ), - AbstractReadJavaBinaryClassTest.class, - TestGenerator.TargetTestFrameworks.JUNIT_3 + AbstractReadJavaBinaryClassTest.class ).generateAndSave(); } } diff --git a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveDescriptorRendererTestGenerated.java b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveDescriptorRendererTestGenerated.java index ef0e226f267..ef442899e96 100644 --- a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveDescriptorRendererTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveDescriptorRendererTestGenerated.java @@ -15,124 +15,83 @@ */ package org.jetbrains.jet.lang.resolve.lazy; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; +import junit.framework.Assert; +import junit.framework.Test; +import junit.framework.TestSuite; import java.io.File; -import java.lang.reflect.Method; -import java.util.HashSet; -import java.util.Set; +import org.jetbrains.jet.JetTestUtils; +import org.jetbrains.jet.test.TestMetadata; -/* This class is generated by LazyResolveTestGenerator. DO NOT MODIFY MANUALLY */ -@RunWith(Suite.class) -@Suite.SuiteClasses({ - LazyResolveDescriptorRendererTestGenerated.Renderer.class, - LazyResolveDescriptorRendererTestGenerated.DescriptorRenderer.class -}) -public class LazyResolveDescriptorRendererTestGenerated { +import org.jetbrains.jet.lang.resolve.lazy.AbstractLazyResolveDescriptorRendererTest; + +/** This class is generated by {@link org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator}. DO NOT MODIFY MANUALLY */ +public class LazyResolveDescriptorRendererTestGenerated extends AbstractLazyResolveDescriptorRendererTest { + @TestMetadata("compiler/testData/renderer") public static class Renderer extends AbstractLazyResolveDescriptorRendererTest { - @Test public void testAllFilesPresentInRenderer() throws Exception { - allTestsPresent(Renderer.class, new File("compiler/testData/renderer"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/renderer"), "kt", false); } - @Test + @TestMetadata("Classes.kt") public void testClasses() throws Exception { doTest("compiler/testData/renderer/Classes.kt"); } - @Test + @TestMetadata("Enum.kt") public void testEnum() throws Exception { doTest("compiler/testData/renderer/Enum.kt"); } - @Test + @TestMetadata("ErrorType.kt") public void testErrorType() throws Exception { doTest("compiler/testData/renderer/ErrorType.kt"); } - @Test + @TestMetadata("FunctionTypes.kt") public void testFunctionTypes() throws Exception { doTest("compiler/testData/renderer/FunctionTypes.kt"); } - @Test + @TestMetadata("GlobalFunctions.kt") public void testGlobalFunctions() throws Exception { doTest("compiler/testData/renderer/GlobalFunctions.kt"); } - @Test + @TestMetadata("GlobalProperties.kt") public void testGlobalProperties() throws Exception { doTest("compiler/testData/renderer/GlobalProperties.kt"); } - @Test + @TestMetadata("InheritedMembersVisibility.kt") public void testInheritedMembersVisibility() throws Exception { doTest("compiler/testData/renderer/InheritedMembersVisibility.kt"); } - @Test + @TestMetadata("TupleTypes.kt") public void testTupleTypes() throws Exception { doTest("compiler/testData/renderer/TupleTypes.kt"); } - public static void allTestsPresent(Class clazz, File testDataDir, boolean recursive) { - Set methodNames = new HashSet(); - for (Method method : clazz.getDeclaredMethods()) { - if (method.isAnnotationPresent(Test.class)) { - methodNames.add(method.getName().toLowerCase() + ".kt"); - } - } - for (File file : testDataDir.listFiles()) { - if (file.isDirectory()) { - if (recursive) { - allTestsPresent(clazz, file, recursive); - } - } - else { - String name = file.getName(); - if (name.endsWith(".kt") && !methodNames.contains("test" + name.toLowerCase())) { - Assert.fail("Test data file missing from the generated test class: " + file + "\nPlease re-run the generator: LazyResolveTestGenerator"); - } - } - } - } } + @TestMetadata("compiler/testData/lazyResolve/descriptorRenderer") public static class DescriptorRenderer extends AbstractLazyResolveDescriptorRendererTest { - @Test public void testAllFilesPresentInDescriptorRenderer() throws Exception { - allTestsPresent(DescriptorRenderer.class, new File("compiler/testData/lazyResolve/descriptorRenderer"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/lazyResolve/descriptorRenderer"), "kt", false); } - @Test + @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { doTest("compiler/testData/lazyResolve/descriptorRenderer/ClassObject.kt"); } - public static void allTestsPresent(Class clazz, File testDataDir, boolean recursive) { - Set methodNames = new HashSet(); - for (Method method : clazz.getDeclaredMethods()) { - if (method.isAnnotationPresent(Test.class)) { - methodNames.add(method.getName().toLowerCase() + ".kt"); - } - } - for (File file : testDataDir.listFiles()) { - if (file.isDirectory()) { - if (recursive) { - allTestsPresent(clazz, file, recursive); - } - } - else { - String name = file.getName(); - if (name.endsWith(".kt") && !methodNames.contains("test" + name.toLowerCase())) { - Assert.fail("Test data file missing from the generated test class: " + file + "\nPlease re-run the generator: LazyResolveTestGenerator"); - } - } - } - } } + public static Test suite() { + TestSuite suite = new TestSuite("LazyResolveDescriptorRendererTestGenerated"); + suite.addTestSuite(Renderer.class); + suite.addTestSuite(DescriptorRenderer.class); + return suite; + } } diff --git a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java index 2b7c30a467f..4fad441a6e1 100644 --- a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java @@ -15,1149 +15,1278 @@ */ package org.jetbrains.jet.lang.resolve.lazy; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; +import junit.framework.Assert; +import junit.framework.Test; +import junit.framework.TestSuite; import java.io.File; -import java.lang.reflect.Method; -import java.util.HashSet; -import java.util.Set; +import org.jetbrains.jet.JetTestUtils; +import org.jetbrains.jet.test.TestMetadata; -/* This class is generated by LazyResolveTestGenerator. DO NOT MODIFY MANUALLY */ -@RunWith(Suite.class) -@Suite.SuiteClasses({ - LazyResolveNamespaceComparingTestGenerated.ReadKotlinBinaryClass.class, - LazyResolveNamespaceComparingTestGenerated.ReadJavaBinaryClass.class, - LazyResolveNamespaceComparingTestGenerated.NamespaceComparator.class -}) -public class LazyResolveNamespaceComparingTestGenerated { +import org.jetbrains.jet.lang.resolve.lazy.AbstractLazyResolveNamespaceComparingTest; + +/** This class is generated by {@link org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator}. DO NOT MODIFY MANUALLY */ +public class LazyResolveNamespaceComparingTestGenerated extends AbstractLazyResolveNamespaceComparingTest { + @TestMetadata("compiler/testData/readKotlinBinaryClass") public static class ReadKotlinBinaryClass extends AbstractLazyResolveNamespaceComparingTest { - @Test public void testAllFilesPresentInReadKotlinBinaryClass() throws Exception { - allTestsPresent(ReadKotlinBinaryClass.class, new File("compiler/testData/readKotlinBinaryClass"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass"), "kt", false); } - @Test - public void testClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/Class.kt"); - } - - @Test - public void testClassInnerClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassInnerClass.kt"); - } - - @Test - public void testClassInParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassInParam.kt"); - } - - @Test - public void testClassOutParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassOutParam.kt"); - } - - @Test - public void testClassParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParam.kt"); - } - - @Test - public void testClassParamReferencesParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamReferencesParam.kt"); - } - - @Test - public void testClassParamReferencesParam2() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamReferencesParam2.kt"); - } - - @Test - public void testClassParamReferencesSelf() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamReferencesSelf.kt"); - } - - @Test - public void testClassParamUpperClassBound() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamUpperClassBound.kt"); - } - - @Test - public void testClassParamUpperClassInterfaceBound() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamUpperClassInterfaceBound.kt"); - } - - @Test - public void testClassParamUpperInterfaceBound() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamUpperInterfaceBound.kt"); - } - - @Test - public void testClassParamUpperInterfaceClassBound() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamUpperInterfaceClassBound.kt"); - } - - @Test - public void testClassTwoParams() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassTwoParams.kt"); - } - - @Test - public void testClassTwoParams2() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassTwoParams2.kt"); - } - - @Test - public void testInheritClassSimple() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/InheritClassSimple.kt"); - } - - @Test - public void testInheritClassWithParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/InheritClassWithParam.kt"); - } - - @Test - public void testInheritTraitWithParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/InheritTraitWithParam.kt"); - } - - @Test - public void testInnerClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/InnerClass.kt"); - } - - @Test - public void testInnerClassExtendInnerClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/InnerClassExtendInnerClass.kt"); - } - - @Test - public void testTrait() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/Trait.kt"); - } - - @Test - public void testClassInParamUsedInFun() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/ClassInParamUsedInFun.kt"); - } - - @Test - public void testClassParamUsedInFun() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/ClassParamUsedInFun.kt"); - } - - @Test - public void testFunDelegationToTraitImpl() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/FunDelegationToTraitImpl.kt"); - } - - @Test - public void testFunInParamSuper() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/FunInParamSuper.kt"); - } - - @Test - public void testTraitFinalFun() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/TraitFinalFun.kt"); - } - - @Test - public void testTraitOpenFun() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/TraitOpenFun.kt"); - } - - @Test - public void testClassObjectDeclaresVal() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classObject/ClassObjectDeclaresVal.kt"); - } - - @Test - public void testClassObjectDeclaresVar() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classObject/ClassObjectDeclaresVar.kt"); - } - - @Test - public void testClassObjectExtendsTrait() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classObject/ClassObjectExtendsTrait.kt"); - } - - @Test - public void testClassObjectExtendsTraitWithTP() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classObject/ClassObjectExtendsTraitWithTP.kt"); - } - - @Test - public void testSimpleClassObject() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classObject/SimpleClassObject.kt"); - } - - @Test - public void testConstructor0() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/Constructor0.kt"); - } - - @Test - public void testConstructor1() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/Constructor1.kt"); - } - - @Test - public void testConstructor1WithParamDefaultValue() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/Constructor1WithParamDefaultValue.kt"); - } - - @Test - public void testConstructorCollectionParameter() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorCollectionParameter.kt"); - } - - @Test - public void testConstructorWithTwoTypeParameters() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTwoTypeParameters.kt"); - } - - @Test - public void testConstructorWithTwoTypeParametersAndOneIntValueParameter() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); - } - - @Test - public void testConstructorWithTwoTypeParametersAndOnePValueParameter() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); - } - - @Test - public void testConstructorWithTypeParameter() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTypeParameter.kt"); - } - - @Test - public void testConstructorWithTypeParametersEAndOnePValueParameter() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); - } - - @Test - public void testFunClassParamNotNull() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); - } - - @Test - public void testFunClassParamNullable() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); - } - - @Test - public void testFunParamNullable() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables/FunParamNullable.kt"); - } - - @Test - public void testReturnTypeClassParamNotNull() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); - } - - @Test - public void testReturnTypeClassParamNullable() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); - } - - @Test - public void testFunGenericParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunGenericParam.kt"); - } - - @Test - public void testFunInParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunInParam.kt"); - } - - @Test - public void testFunOutParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunOutParam.kt"); - } - - @Test - public void testFunParamParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamParam.kt"); - } - - @Test - public void testFunParamParamErased() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamParamErased.kt"); - } - - @Test - public void testFunParamReferencesParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); - } - - @Test - public void testFunParamReferencesParam2() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamReferencesParam2.kt"); - } - - @Test - public void testFunParamTwoUpperBounds() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); - } - - @Test - public void testFunParamUpperClassBound() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); - } - - @Test - public void testFunParamUpperClassInterfaceBound() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); - } - - @Test - public void testFunParamUpperInterfaceBound() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); - } - - @Test - public void testFunParamUpperInterfaceClassBound() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamUpperInterfaceClassBound.kt"); - } - - @Test - public void testFunParamVaragParam() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamVaragParam.kt"); - } - - @Test - public void testFunTwoTypeParams() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); - } - - @Test - public void testFunTwoTypeParams2() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunTwoTypeParams2.kt"); - } - - @Test - public void testClassFun() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ClassFun.kt"); - } - - @Test - public void testClassFunGetFoo() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ClassFunGetFoo.kt"); - } - - @Test - public void testClassFunGetFooSetFoo() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); - } - - @Test - public void testClassFunSetFoo() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ClassFunSetFoo.kt"); - } - - @Test - public void testExtFun() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ExtFun.kt"); - } - - @Test - public void testExtFunInClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ExtFunInClass.kt"); - } - - @Test - public void testFunDefaultArg() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/FunDefaultArg.kt"); - } - - @Test - public void testFunParamNotNull() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/FunParamNotNull.kt"); - } - - @Test - public void testFunVarargInt() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/FunVarargInt.kt"); - } - - @Test - public void testFunVarargInteger() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/FunVarargInteger.kt"); - } - - @Test - public void testModifierAbstract() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ModifierAbstract.kt"); - } - - @Test - public void testModifierOpen() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ModifierOpen.kt"); - } - - @Test - public void testNsFun() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/NsFun.kt"); - } - - @Test - public void testNsFunGetFoo() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/NsFunGetFoo.kt"); - } - - @Test - public void testReturnTypeNotNull() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ReturnTypeNotNull.kt"); - } - - @Test - public void testReturnTypeNullable() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ReturnTypeNullable.kt"); - } - - @Test - public void testClassVal() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ClassVal.kt"); - } - - @Test - public void testClassValAbstract() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ClassValAbstract.kt"); - } - - @Test - public void testClassVar() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ClassVar.kt"); - } - - @Test - public void testCollectionSize() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/CollectionSize.kt"); - } - - @Test - public void testExtValClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValClass.kt"); - } - - @Test - public void testExtValInClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValInClass.kt"); - } - - @Test - public void testExtValInt() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValInt.kt"); - } - - @Test - public void testExtValIntCharSequence() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValIntCharSequence.kt"); - } - - @Test - public void testExtValIntCharSequenceQ() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValIntCharSequenceQ.kt"); - } - - @Test - public void testExtValIntListQOfIntInClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValIntListQOfIntInClass.kt"); - } - - @Test - public void testExtValIntTInClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValIntTInClass.kt"); - } - - @Test - public void testExtValIntTQInClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValIntTQInClass.kt"); - } - - @Test - public void testExtValTIntInClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValTIntInClass.kt"); - } - - @Test - public void testExtVarClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarClass.kt"); - } - - @Test - public void testExtVarInClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarInClass.kt"); - } - - @Test - public void testExtVarInt() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarInt.kt"); - } - - @Test - public void testExtVarIntTInClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarIntTInClass.kt"); - } - - @Test - public void testExtVarIntTQInClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarIntTQInClass.kt"); - } - - @Test - public void testExtVarl() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarl.kt"); - } - - @Test - public void testExtVarMapPQInt() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarMapPQInt.kt"); - } - - @Test - public void testExtVarTIntInClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarTIntInClass.kt"); - } - - @Test - public void testExtVarTQIntInClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarTQIntInClass.kt"); - } - - @Test - public void testNsVal() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/NsVal.kt"); - } - - @Test - public void testNsVar() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/NsVar.kt"); - } - - @Test - public void testOverrideClassVal() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/OverrideClassVal.kt"); - } - - @Test - public void testOverrideTraitVal() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/OverrideTraitVal.kt"); - } - - @Test - public void testPropFromSuperclass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/PropFromSuperclass.kt"); - } - - @Test - public void testTraitFinalVar() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/TraitFinalVar.kt"); - } - - @Test - public void testTraitOpenVal() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/TraitOpenVal.kt"); - } - - @Test - public void testVarDelegationToTraitImpl() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/VarDelegationToTraitImpl.kt"); - } - - @Test - public void testAny() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/Any.kt"); - } - - @Test - public void testAnyQ() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/AnyQ.kt"); - } - - @Test - public void testArrayOfInt() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ArrayOfInt.kt"); - } - - @Test - public void testArrayOfInteger() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ArrayOfInteger.kt"); - } - - @Test - public void testArrayOfString() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ArrayOfString.kt"); - } - - @Test - public void testFunction1IntString() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/Function1IntString.kt"); - } - - @Test - public void testInt() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/Int.kt"); - } - - @Test - public void testIntArray() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/IntArray.kt"); - } - - @Test - public void testIntQ() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/IntQ.kt"); - } - - @Test - public void testJlInteger() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlInteger.kt"); - } - - @Test - public void testJlIntegerQ() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlIntegerQ.kt"); - } - - @Test - public void testJlObject() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlObject.kt"); - } - - @Test - public void testJlObjectQ() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlObjectQ.kt"); - } - - @Test - public void testJlString() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlString.kt"); - } - - @Test - public void testJlStringQ() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlStringQ.kt"); - } - - @Test - public void testListOfAny() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ListOfAny.kt"); - } - - @Test - public void testListOfAnyQ() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ListOfAnyQ.kt"); - } - - @Test - public void testListOfjlString() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ListOfjlString.kt"); - } - - @Test - public void testListOfStar() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ListOfStar.kt"); - } - - @Test - public void testListOfString() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ListOfString.kt"); - } - - @Test - public void testNothing() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/Nothing.kt"); - } - - @Test - public void testNothingQ() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/NothingQ.kt"); - } - - @Test - public void testString() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/String.kt"); - } - - @Test - public void testStringQ() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/StringQ.kt"); - } - - @Test - public void testTuple0() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/Tuple0.kt"); - } - - @Test - public void testInternalAbstractTraitMembersOverridden() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalAbstractTraitMembersOverridden.kt"); - } - - @Test - public void testInternalClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalClass.kt"); - } - - @Test - public void testInternalConstructor() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalConstructor.kt"); - } - - @Test - public void testInternalTopLevelMembers() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalTopLevelMembers.kt"); - } - - @Test - public void testInternalTraitMembers() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalTraitMembers.kt"); - } - - @Test - public void testInternalTraitMembersInherited() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalTraitMembersInherited.kt"); - } - - @Test - public void testPrivateClass() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/PrivateClass.kt"); - } - - @Test - public void testPrivateTopLevelFun() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/PrivateTopLevelFun.kt"); - } - - @Test - public void testPrivateTopLevelVal() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/PrivateTopLevelVal.kt"); - } - - @Test - public void testTopLevelVarWithPrivateSetter() throws Exception { - doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/TopLevelVarWithPrivateSetter.kt"); - } - - public static void allTestsPresent(Class clazz, File testDataDir, boolean recursive) { - Set methodNames = new HashSet(); - for (Method method : clazz.getDeclaredMethods()) { - if (method.isAnnotationPresent(Test.class)) { - methodNames.add(method.getName().toLowerCase() + ".kt"); - } + @TestMetadata("compiler/testData/readKotlinBinaryClass/class") + public static class Class extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInClass() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass/class"), "kt", false); } - for (File file : testDataDir.listFiles()) { - if (file.isDirectory()) { - if (recursive) { - allTestsPresent(clazz, file, recursive); - } - } - else { - String name = file.getName(); - if (name.endsWith(".kt") && !methodNames.contains("test" + name.toLowerCase())) { - Assert.fail("Test data file missing from the generated test class: " + file + "\nPlease re-run the generator: LazyResolveTestGenerator"); - } - } + + @TestMetadata("Class.kt") + public void testClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/Class.kt"); } + + @TestMetadata("ClassInnerClass.kt") + public void testClassInnerClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassInnerClass.kt"); + } + + @TestMetadata("ClassInParam.kt") + public void testClassInParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassInParam.kt"); + } + + @TestMetadata("ClassOutParam.kt") + public void testClassOutParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassOutParam.kt"); + } + + @TestMetadata("ClassParam.kt") + public void testClassParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParam.kt"); + } + + @TestMetadata("ClassParamReferencesParam.kt") + public void testClassParamReferencesParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamReferencesParam.kt"); + } + + @TestMetadata("ClassParamReferencesParam2.kt") + public void testClassParamReferencesParam2() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamReferencesParam2.kt"); + } + + @TestMetadata("ClassParamReferencesSelf.kt") + public void testClassParamReferencesSelf() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamReferencesSelf.kt"); + } + + @TestMetadata("ClassParamUpperClassBound.kt") + public void testClassParamUpperClassBound() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamUpperClassBound.kt"); + } + + @TestMetadata("ClassParamUpperClassInterfaceBound.kt") + public void testClassParamUpperClassInterfaceBound() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamUpperClassInterfaceBound.kt"); + } + + @TestMetadata("ClassParamUpperInterfaceBound.kt") + public void testClassParamUpperInterfaceBound() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamUpperInterfaceBound.kt"); + } + + @TestMetadata("ClassParamUpperInterfaceClassBound.kt") + public void testClassParamUpperInterfaceClassBound() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassParamUpperInterfaceClassBound.kt"); + } + + @TestMetadata("ClassTwoParams.kt") + public void testClassTwoParams() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassTwoParams.kt"); + } + + @TestMetadata("ClassTwoParams2.kt") + public void testClassTwoParams2() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/ClassTwoParams2.kt"); + } + + @TestMetadata("InheritClassSimple.kt") + public void testInheritClassSimple() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/InheritClassSimple.kt"); + } + + @TestMetadata("InheritClassWithParam.kt") + public void testInheritClassWithParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/InheritClassWithParam.kt"); + } + + @TestMetadata("InheritTraitWithParam.kt") + public void testInheritTraitWithParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/InheritTraitWithParam.kt"); + } + + @TestMetadata("InnerClass.kt") + public void testInnerClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/InnerClass.kt"); + } + + @TestMetadata("InnerClassExtendInnerClass.kt") + public void testInnerClassExtendInnerClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/InnerClassExtendInnerClass.kt"); + } + + @TestMetadata("Trait.kt") + public void testTrait() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/class/Trait.kt"); + } + + } + + @TestMetadata("compiler/testData/readKotlinBinaryClass/classFun") + public static class ClassFun extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInClassFun() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass/classFun"), "kt", false); + } + + @TestMetadata("ClassInParamUsedInFun.kt") + public void testClassInParamUsedInFun() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/ClassInParamUsedInFun.kt"); + } + + @TestMetadata("ClassParamUsedInFun.kt") + public void testClassParamUsedInFun() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/ClassParamUsedInFun.kt"); + } + + @TestMetadata("FunDelegationToTraitImpl.kt") + public void testFunDelegationToTraitImpl() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/FunDelegationToTraitImpl.kt"); + } + + @TestMetadata("FunInParamSuper.kt") + public void testFunInParamSuper() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/FunInParamSuper.kt"); + } + + @TestMetadata("TraitFinalFun.kt") + public void testTraitFinalFun() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/TraitFinalFun.kt"); + } + + @TestMetadata("TraitOpenFun.kt") + public void testTraitOpenFun() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classFun/TraitOpenFun.kt"); + } + + } + + @TestMetadata("compiler/testData/readKotlinBinaryClass/classObject") + public static class ClassObject extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInClassObject() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass/classObject"), "kt", false); + } + + @TestMetadata("ClassObjectDeclaresVal.kt") + public void testClassObjectDeclaresVal() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classObject/ClassObjectDeclaresVal.kt"); + } + + @TestMetadata("ClassObjectDeclaresVar.kt") + public void testClassObjectDeclaresVar() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classObject/ClassObjectDeclaresVar.kt"); + } + + @TestMetadata("ClassObjectExtendsTrait.kt") + public void testClassObjectExtendsTrait() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classObject/ClassObjectExtendsTrait.kt"); + } + + @TestMetadata("ClassObjectExtendsTraitWithTP.kt") + public void testClassObjectExtendsTraitWithTP() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classObject/ClassObjectExtendsTraitWithTP.kt"); + } + + @TestMetadata("SimpleClassObject.kt") + public void testSimpleClassObject() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/classObject/SimpleClassObject.kt"); + } + + } + + @TestMetadata("compiler/testData/readKotlinBinaryClass/constructor") + public static class Constructor extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInConstructor() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass/constructor"), "kt", false); + } + + @TestMetadata("Constructor0.kt") + public void testConstructor0() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/Constructor0.kt"); + } + + @TestMetadata("Constructor1.kt") + public void testConstructor1() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/Constructor1.kt"); + } + + @TestMetadata("Constructor1WithParamDefaultValue.kt") + public void testConstructor1WithParamDefaultValue() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/Constructor1WithParamDefaultValue.kt"); + } + + @TestMetadata("ConstructorCollectionParameter.kt") + public void testConstructorCollectionParameter() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorCollectionParameter.kt"); + } + + @TestMetadata("ConstructorWithTwoTypeParameters.kt") + public void testConstructorWithTwoTypeParameters() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTwoTypeParameters.kt"); + } + + @TestMetadata("ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt") + public void testConstructorWithTwoTypeParametersAndOneIntValueParameter() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); + } + + @TestMetadata("ConstructorWithTwoTypeParametersAndOnePValueParameter.kt") + public void testConstructorWithTwoTypeParametersAndOnePValueParameter() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); + } + + @TestMetadata("ConstructorWithTypeParameter.kt") + public void testConstructorWithTypeParameter() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTypeParameter.kt"); + } + + @TestMetadata("ConstructorWithTypeParametersEAndOnePValueParameter.kt") + public void testConstructorWithTypeParametersEAndOnePValueParameter() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); + } + + } + + @TestMetadata("compiler/testData/readKotlinBinaryClass/fun") + public static class Fun extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInFun() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass/fun"), "kt", false); + } + + @TestMetadata("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables") + public static class GenericWithoutTypeVariables extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInGenericWithoutTypeVariables() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables"), "kt", false); + } + + @TestMetadata("FunClassParamNotNull.kt") + public void testFunClassParamNotNull() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); + } + + @TestMetadata("FunClassParamNullable.kt") + public void testFunClassParamNullable() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); + } + + @TestMetadata("FunParamNullable.kt") + public void testFunParamNullable() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables/FunParamNullable.kt"); + } + + @TestMetadata("ReturnTypeClassParamNotNull.kt") + public void testReturnTypeClassParamNotNull() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); + } + + @TestMetadata("ReturnTypeClassParamNullable.kt") + public void testReturnTypeClassParamNullable() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); + } + + } + + @TestMetadata("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables") + public static class GenericWithTypeVariables extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInGenericWithTypeVariables() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables"), "kt", false); + } + + @TestMetadata("FunGenericParam.kt") + public void testFunGenericParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunGenericParam.kt"); + } + + @TestMetadata("FunInParam.kt") + public void testFunInParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunInParam.kt"); + } + + @TestMetadata("FunOutParam.kt") + public void testFunOutParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunOutParam.kt"); + } + + @TestMetadata("FunParamParam.kt") + public void testFunParamParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamParam.kt"); + } + + @TestMetadata("FunParamParamErased.kt") + public void testFunParamParamErased() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamParamErased.kt"); + } + + @TestMetadata("FunParamReferencesParam.kt") + public void testFunParamReferencesParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); + } + + @TestMetadata("FunParamReferencesParam2.kt") + public void testFunParamReferencesParam2() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamReferencesParam2.kt"); + } + + @TestMetadata("FunParamTwoUpperBounds.kt") + public void testFunParamTwoUpperBounds() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); + } + + @TestMetadata("FunParamUpperClassBound.kt") + public void testFunParamUpperClassBound() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); + } + + @TestMetadata("FunParamUpperClassInterfaceBound.kt") + public void testFunParamUpperClassInterfaceBound() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); + } + + @TestMetadata("FunParamUpperInterfaceBound.kt") + public void testFunParamUpperInterfaceBound() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); + } + + @TestMetadata("FunParamUpperInterfaceClassBound.kt") + public void testFunParamUpperInterfaceClassBound() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamUpperInterfaceClassBound.kt"); + } + + @TestMetadata("FunParamVaragParam.kt") + public void testFunParamVaragParam() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamVaragParam.kt"); + } + + @TestMetadata("FunTwoTypeParams.kt") + public void testFunTwoTypeParams() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); + } + + @TestMetadata("FunTwoTypeParams2.kt") + public void testFunTwoTypeParams2() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunTwoTypeParams2.kt"); + } + + } + + @TestMetadata("compiler/testData/readKotlinBinaryClass/fun/nonGeneric") + public static class NonGeneric extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInNonGeneric() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass/fun/nonGeneric"), "kt", false); + } + + @TestMetadata("ClassFun.kt") + public void testClassFun() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ClassFun.kt"); + } + + @TestMetadata("ClassFunGetFoo.kt") + public void testClassFunGetFoo() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ClassFunGetFoo.kt"); + } + + @TestMetadata("ClassFunGetFooSetFoo.kt") + public void testClassFunGetFooSetFoo() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); + } + + @TestMetadata("ClassFunSetFoo.kt") + public void testClassFunSetFoo() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ClassFunSetFoo.kt"); + } + + @TestMetadata("ExtFun.kt") + public void testExtFun() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ExtFun.kt"); + } + + @TestMetadata("ExtFunInClass.kt") + public void testExtFunInClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ExtFunInClass.kt"); + } + + @TestMetadata("FunDefaultArg.kt") + public void testFunDefaultArg() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/FunDefaultArg.kt"); + } + + @TestMetadata("FunParamNotNull.kt") + public void testFunParamNotNull() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/FunParamNotNull.kt"); + } + + @TestMetadata("FunVarargInt.kt") + public void testFunVarargInt() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/FunVarargInt.kt"); + } + + @TestMetadata("FunVarargInteger.kt") + public void testFunVarargInteger() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/FunVarargInteger.kt"); + } + + @TestMetadata("ModifierAbstract.kt") + public void testModifierAbstract() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ModifierAbstract.kt"); + } + + @TestMetadata("ModifierOpen.kt") + public void testModifierOpen() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ModifierOpen.kt"); + } + + @TestMetadata("NsFun.kt") + public void testNsFun() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/NsFun.kt"); + } + + @TestMetadata("NsFunGetFoo.kt") + public void testNsFunGetFoo() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/NsFunGetFoo.kt"); + } + + @TestMetadata("ReturnTypeNotNull.kt") + public void testReturnTypeNotNull() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ReturnTypeNotNull.kt"); + } + + @TestMetadata("ReturnTypeNullable.kt") + public void testReturnTypeNullable() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/fun/nonGeneric/ReturnTypeNullable.kt"); + } + + } + + public static Test suite() { + TestSuite suite = new TestSuite("Fun"); + suite.addTestSuite(Fun.class); + suite.addTestSuite(GenericWithoutTypeVariables.class); + suite.addTestSuite(GenericWithTypeVariables.class); + suite.addTestSuite(NonGeneric.class); + return suite; + } + } + + @TestMetadata("compiler/testData/readKotlinBinaryClass/prop") + public static class Prop extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInProp() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass/prop"), "kt", false); + } + + @TestMetadata("ClassVal.kt") + public void testClassVal() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ClassVal.kt"); + } + + @TestMetadata("ClassValAbstract.kt") + public void testClassValAbstract() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ClassValAbstract.kt"); + } + + @TestMetadata("ClassVar.kt") + public void testClassVar() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ClassVar.kt"); + } + + @TestMetadata("CollectionSize.kt") + public void testCollectionSize() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/CollectionSize.kt"); + } + + @TestMetadata("ExtValClass.kt") + public void testExtValClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValClass.kt"); + } + + @TestMetadata("ExtValInClass.kt") + public void testExtValInClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValInClass.kt"); + } + + @TestMetadata("ExtValInt.kt") + public void testExtValInt() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValInt.kt"); + } + + @TestMetadata("ExtValIntCharSequence.kt") + public void testExtValIntCharSequence() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValIntCharSequence.kt"); + } + + @TestMetadata("ExtValIntCharSequenceQ.kt") + public void testExtValIntCharSequenceQ() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValIntCharSequenceQ.kt"); + } + + @TestMetadata("ExtValIntListQOfIntInClass.kt") + public void testExtValIntListQOfIntInClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValIntListQOfIntInClass.kt"); + } + + @TestMetadata("ExtValIntTInClass.kt") + public void testExtValIntTInClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValIntTInClass.kt"); + } + + @TestMetadata("ExtValIntTQInClass.kt") + public void testExtValIntTQInClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValIntTQInClass.kt"); + } + + @TestMetadata("ExtValTIntInClass.kt") + public void testExtValTIntInClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtValTIntInClass.kt"); + } + + @TestMetadata("ExtVarClass.kt") + public void testExtVarClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarClass.kt"); + } + + @TestMetadata("ExtVarInClass.kt") + public void testExtVarInClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarInClass.kt"); + } + + @TestMetadata("ExtVarInt.kt") + public void testExtVarInt() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarInt.kt"); + } + + @TestMetadata("ExtVarIntTInClass.kt") + public void testExtVarIntTInClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarIntTInClass.kt"); + } + + @TestMetadata("ExtVarIntTQInClass.kt") + public void testExtVarIntTQInClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarIntTQInClass.kt"); + } + + @TestMetadata("ExtVarl.kt") + public void testExtVarl() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarl.kt"); + } + + @TestMetadata("ExtVarMapPQInt.kt") + public void testExtVarMapPQInt() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarMapPQInt.kt"); + } + + @TestMetadata("ExtVarTIntInClass.kt") + public void testExtVarTIntInClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarTIntInClass.kt"); + } + + @TestMetadata("ExtVarTQIntInClass.kt") + public void testExtVarTQIntInClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/ExtVarTQIntInClass.kt"); + } + + @TestMetadata("NsVal.kt") + public void testNsVal() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/NsVal.kt"); + } + + @TestMetadata("NsVar.kt") + public void testNsVar() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/NsVar.kt"); + } + + @TestMetadata("OverrideClassVal.kt") + public void testOverrideClassVal() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/OverrideClassVal.kt"); + } + + @TestMetadata("OverrideTraitVal.kt") + public void testOverrideTraitVal() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/OverrideTraitVal.kt"); + } + + @TestMetadata("PropFromSuperclass.kt") + public void testPropFromSuperclass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/PropFromSuperclass.kt"); + } + + @TestMetadata("TraitFinalVar.kt") + public void testTraitFinalVar() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/TraitFinalVar.kt"); + } + + @TestMetadata("TraitOpenVal.kt") + public void testTraitOpenVal() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/TraitOpenVal.kt"); + } + + @TestMetadata("VarDelegationToTraitImpl.kt") + public void testVarDelegationToTraitImpl() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/prop/VarDelegationToTraitImpl.kt"); + } + + } + + @TestMetadata("compiler/testData/readKotlinBinaryClass/type") + public static class Type extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInType() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass/type"), "kt", false); + } + + @TestMetadata("Any.kt") + public void testAny() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/Any.kt"); + } + + @TestMetadata("AnyQ.kt") + public void testAnyQ() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/AnyQ.kt"); + } + + @TestMetadata("ArrayOfInt.kt") + public void testArrayOfInt() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ArrayOfInt.kt"); + } + + @TestMetadata("ArrayOfInteger.kt") + public void testArrayOfInteger() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ArrayOfInteger.kt"); + } + + @TestMetadata("ArrayOfString.kt") + public void testArrayOfString() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ArrayOfString.kt"); + } + + @TestMetadata("Function1IntString.kt") + public void testFunction1IntString() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/Function1IntString.kt"); + } + + @TestMetadata("Int.kt") + public void testInt() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/Int.kt"); + } + + @TestMetadata("IntArray.kt") + public void testIntArray() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/IntArray.kt"); + } + + @TestMetadata("IntQ.kt") + public void testIntQ() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/IntQ.kt"); + } + + @TestMetadata("jlInteger.kt") + public void testJlInteger() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlInteger.kt"); + } + + @TestMetadata("jlIntegerQ.kt") + public void testJlIntegerQ() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlIntegerQ.kt"); + } + + @TestMetadata("jlObject.kt") + public void testJlObject() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlObject.kt"); + } + + @TestMetadata("jlObjectQ.kt") + public void testJlObjectQ() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlObjectQ.kt"); + } + + @TestMetadata("jlString.kt") + public void testJlString() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlString.kt"); + } + + @TestMetadata("jlStringQ.kt") + public void testJlStringQ() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/jlStringQ.kt"); + } + + @TestMetadata("ListOfAny.kt") + public void testListOfAny() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ListOfAny.kt"); + } + + @TestMetadata("ListOfAnyQ.kt") + public void testListOfAnyQ() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ListOfAnyQ.kt"); + } + + @TestMetadata("ListOfjlString.kt") + public void testListOfjlString() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ListOfjlString.kt"); + } + + @TestMetadata("ListOfStar.kt") + public void testListOfStar() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ListOfStar.kt"); + } + + @TestMetadata("ListOfString.kt") + public void testListOfString() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/ListOfString.kt"); + } + + @TestMetadata("Nothing.kt") + public void testNothing() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/Nothing.kt"); + } + + @TestMetadata("NothingQ.kt") + public void testNothingQ() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/NothingQ.kt"); + } + + @TestMetadata("String.kt") + public void testString() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/String.kt"); + } + + @TestMetadata("StringQ.kt") + public void testStringQ() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/StringQ.kt"); + } + + @TestMetadata("Tuple0.kt") + public void testTuple0() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/type/Tuple0.kt"); + } + + } + + @TestMetadata("compiler/testData/readKotlinBinaryClass/visibility") + public static class Visibility extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInVisibility() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readKotlinBinaryClass/visibility"), "kt", false); + } + + @TestMetadata("InternalAbstractTraitMembersOverridden.kt") + public void testInternalAbstractTraitMembersOverridden() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalAbstractTraitMembersOverridden.kt"); + } + + @TestMetadata("InternalClass.kt") + public void testInternalClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalClass.kt"); + } + + @TestMetadata("InternalConstructor.kt") + public void testInternalConstructor() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalConstructor.kt"); + } + + @TestMetadata("InternalTopLevelMembers.kt") + public void testInternalTopLevelMembers() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalTopLevelMembers.kt"); + } + + @TestMetadata("InternalTraitMembers.kt") + public void testInternalTraitMembers() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalTraitMembers.kt"); + } + + @TestMetadata("InternalTraitMembersInherited.kt") + public void testInternalTraitMembersInherited() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalTraitMembersInherited.kt"); + } + + @TestMetadata("PrivateClass.kt") + public void testPrivateClass() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/PrivateClass.kt"); + } + + @TestMetadata("PrivateTopLevelFun.kt") + public void testPrivateTopLevelFun() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/PrivateTopLevelFun.kt"); + } + + @TestMetadata("PrivateTopLevelVal.kt") + public void testPrivateTopLevelVal() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/PrivateTopLevelVal.kt"); + } + + @TestMetadata("TopLevelVarWithPrivateSetter.kt") + public void testTopLevelVarWithPrivateSetter() throws Exception { + doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/TopLevelVarWithPrivateSetter.kt"); + } + + } + + public static Test suite() { + TestSuite suite = new TestSuite("ReadKotlinBinaryClass"); + suite.addTestSuite(ReadKotlinBinaryClass.class); + suite.addTestSuite(Class.class); + suite.addTestSuite(ClassFun.class); + suite.addTestSuite(ClassObject.class); + suite.addTestSuite(Constructor.class); + suite.addTest(Fun.suite()); + suite.addTestSuite(Prop.class); + suite.addTestSuite(Type.class); + suite.addTestSuite(Visibility.class); + return suite; } } + @TestMetadata("compiler/testData/readJavaBinaryClass") public static class ReadJavaBinaryClass extends AbstractLazyResolveNamespaceComparingTest { - @Test public void testAllFilesPresentInReadJavaBinaryClass() throws Exception { - allTestsPresent(ReadJavaBinaryClass.class, new File("compiler/testData/readJavaBinaryClass"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readJavaBinaryClass"), "kt", false); } - @Test - public void testAnnotatedAnnotation() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/annotation/AnnotatedAnnotation.kt"); - } - - @Test - public void testAnnotatedMethod() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/annotation/AnnotatedMethod.kt"); - } - - @Test - public void testSimpleAnnotation() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/annotation/SimpleAnnotation.kt"); - } - - @Test + @TestMetadata("ClassDoesNotOverrideMethod.kt") public void testClassDoesNotOverrideMethod() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/ClassDoesNotOverrideMethod.kt"); } - @Test + @TestMetadata("ClassWithTypeP.kt") public void testClassWithTypeP() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/ClassWithTypeP.kt"); } - @Test + @TestMetadata("ClassWithTypePExtendsIterableP.kt") public void testClassWithTypePExtendsIterableP() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/ClassWithTypePExtendsIterableP.kt"); } - @Test + @TestMetadata("ClassWithTypePP.kt") public void testClassWithTypePP() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/ClassWithTypePP.kt"); } - @Test + @TestMetadata("ClassWithTypePRefNext.kt") public void testClassWithTypePRefNext() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/ClassWithTypePRefNext.kt"); } - @Test + @TestMetadata("ClassWithTypePRefSelf.kt") public void testClassWithTypePRefSelf() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/ClassWithTypePRefSelf.kt"); } - @Test - public void testConstructorGenericDeep() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/constructor/ConstructorGenericDeep.kt"); - } - - @Test - public void testConstructorGenericSimple() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/constructor/ConstructorGenericSimple.kt"); - } - - @Test - public void testConstructorGenericUpperBound() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/constructor/ConstructorGenericUpperBound.kt"); - } - - @Test + @TestMetadata("FieldAsVar.kt") public void testFieldAsVar() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/FieldAsVar.kt"); } - @Test + @TestMetadata("FieldOfArrayType.kt") public void testFieldOfArrayType() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/FieldOfArrayType.kt"); } - @Test + @TestMetadata("FinalFieldAsVal.kt") public void testFinalFieldAsVal() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/FinalFieldAsVal.kt"); } - @Test + @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/InnerClass.kt"); } - @Test + @TestMetadata("InnerClassesInGeneric.kt") public void testInnerClassesInGeneric() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/InnerClassesInGeneric.kt"); } - @Test + @TestMetadata("InnerClassReferencesOuterTP.kt") public void testInnerClassReferencesOuterTP() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/InnerClassReferencesOuterTP.kt"); } - @Test - public void testDifferentGetterAndSetter() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/DifferentGetterAndSetter.kt"); - } - - @Test - public void testJavaBeanAbstractGetter() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/JavaBeanAbstractGetter.kt"); - } - - @Test - public void testJavaBeanVal() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/JavaBeanVal.kt"); - } - - @Test - public void testJavaBeanVar() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/JavaBeanVar.kt"); - } - - @Test - public void testJavaBeanVarOfGenericType() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/JavaBeanVarOfGenericType.kt"); - } - - @Test - public void testTwoSetters() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/TwoSetters.kt"); - } - - @Test - public void testAddingNullability() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/AddingNullability.kt"); - } - - @Test - public void testExtraUpperBound() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/ExtraUpperBound.kt"); - } - - @Test - public void testMissingUpperBound() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/MissingUpperBound.kt"); - } - - @Test - public void testNotVarargReplacedWithVararg() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); - } - - @Test - public void testReturnTypeMissing() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/ReturnTypeMissing.kt"); - } - - @Test - public void testSyntaxError() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/SyntaxError.kt"); - } - - @Test - public void testVarargReplacedWithNotVararg() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); - } - - @Test - public void testWrongMethodName() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongMethodName.kt"); - } - - @Test - public void testWrongReturnTypeStructure() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongReturnTypeStructure.kt"); - } - - @Test - public void testWrongTypeName1() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeName1.kt"); - } - - @Test - public void testWrongTypeName2() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeName2.kt"); - } - - @Test - public void testWrongTypeName3() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeName3.kt"); - } - - @Test - public void testWrongTypeParameterBoundStructure1() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); - } - - @Test - public void testWrongTypeParameterBoundStructure2() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); - } - - @Test - public void testWrongTypeParametersCount() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeParametersCount.kt"); - } - - @Test - public void testWrongTypeVariance() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeVariance.kt"); - } - - @Test - public void testWrongValueParametersCount() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongValueParametersCount.kt"); - } - - @Test - public void testWrongValueParameterStructure1() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongValueParameterStructure1.kt"); - } - - @Test - public void testWrongValueParameterStructure2() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongValueParameterStructure2.kt"); - } - - @Test - public void testMethodWithFunctionTypes() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithFunctionTypes.kt"); - } - - @Test - public void testMethodWithGenerics() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithGenerics.kt"); - } - - @Test - public void testMethodWithTupleType() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTupleType.kt"); - } - - @Test - public void testMethodWithTypeParameters() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.kt"); - } - - @Test - public void testMethodWithVararg() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithVararg.kt"); - } - - @Test + @TestMetadata("MethodReferencesOuterClassTP.kt") public void testMethodReferencesOuterClassTP() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/MethodReferencesOuterClassTP.kt"); } - @Test + @TestMetadata("MethodTypePOneUpperBound.kt") public void testMethodTypePOneUpperBound() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.kt"); } - @Test + @TestMetadata("MethodTypePTwoUpperBounds.kt") public void testMethodTypePTwoUpperBounds() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.kt"); } - @Test + @TestMetadata("MethodWithTypeP.kt") public void testMethodWithTypeP() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/MethodWithTypeP.kt"); } - @Test + @TestMetadata("MethodWithTypePP.kt") public void testMethodWithTypePP() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/MethodWithTypePP.kt"); } - @Test + @TestMetadata("MethodWithTypePRefClassP.kt") public void testMethodWithTypePRefClassP() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/MethodWithTypePRefClassP.kt"); } - @Test + @TestMetadata("MethosWithPRefTP.kt") public void testMethosWithPRefTP() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/MethosWithPRefTP.kt"); } - @Test - public void testModalityOfFakeOverrides() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/modality/ModalityOfFakeOverrides.kt"); - } - - @Test + @TestMetadata("MyException.kt") public void testMyException() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/MyException.kt"); } - @Test - public void testNotNullField() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/notNull/NotNullField.kt"); - } - - @Test - public void testNotNullMethod() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/notNull/NotNullMethod.kt"); - } - - @Test - public void testNotNullParameter() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/notNull/NotNullParameter.kt"); - } - - @Test + @TestMetadata("Simple.kt") public void testSimple() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/Simple.kt"); } - @Test + @TestMetadata("TwoFields.kt") public void testTwoFields() throws Exception { doTestSinglePackage("compiler/testData/readJavaBinaryClass/TwoFields.kt"); } - @Test - public void testVarargInt() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/vararg/VarargInt.kt"); + @TestMetadata("compiler/testData/readJavaBinaryClass/annotation") + public static class Annotation extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInAnnotation() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readJavaBinaryClass/annotation"), "kt", false); + } + + @TestMetadata("AnnotatedAnnotation.kt") + public void testAnnotatedAnnotation() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/annotation/AnnotatedAnnotation.kt"); + } + + @TestMetadata("AnnotatedMethod.kt") + public void testAnnotatedMethod() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/annotation/AnnotatedMethod.kt"); + } + + @TestMetadata("SimpleAnnotation.kt") + public void testSimpleAnnotation() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/annotation/SimpleAnnotation.kt"); + } + } - @Test - public void testVarargString() throws Exception { - doTestSinglePackage("compiler/testData/readJavaBinaryClass/vararg/VarargString.kt"); + @TestMetadata("compiler/testData/readJavaBinaryClass/constructor") + public static class Constructor extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInConstructor() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readJavaBinaryClass/constructor"), "kt", false); + } + + @TestMetadata("ConstructorGenericDeep.kt") + public void testConstructorGenericDeep() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/constructor/ConstructorGenericDeep.kt"); + } + + @TestMetadata("ConstructorGenericSimple.kt") + public void testConstructorGenericSimple() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/constructor/ConstructorGenericSimple.kt"); + } + + @TestMetadata("ConstructorGenericUpperBound.kt") + public void testConstructorGenericUpperBound() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/constructor/ConstructorGenericUpperBound.kt"); + } + } - public static void allTestsPresent(Class clazz, File testDataDir, boolean recursive) { - Set methodNames = new HashSet(); - for (Method method : clazz.getDeclaredMethods()) { - if (method.isAnnotationPresent(Test.class)) { - methodNames.add(method.getName().toLowerCase() + ".kt"); - } + @TestMetadata("compiler/testData/readJavaBinaryClass/javaBean") + public static class JavaBean extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInJavaBean() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readJavaBinaryClass/javaBean"), "kt", false); } - for (File file : testDataDir.listFiles()) { - if (file.isDirectory()) { - if (recursive) { - allTestsPresent(clazz, file, recursive); - } - } - else { - String name = file.getName(); - if (name.endsWith(".kt") && !methodNames.contains("test" + name.toLowerCase())) { - Assert.fail("Test data file missing from the generated test class: " + file + "\nPlease re-run the generator: LazyResolveTestGenerator"); - } - } + + @TestMetadata("DifferentGetterAndSetter.kt") + public void testDifferentGetterAndSetter() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/DifferentGetterAndSetter.kt"); } + + @TestMetadata("JavaBeanAbstractGetter.kt") + public void testJavaBeanAbstractGetter() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/JavaBeanAbstractGetter.kt"); + } + + @TestMetadata("JavaBeanVal.kt") + public void testJavaBeanVal() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/JavaBeanVal.kt"); + } + + @TestMetadata("JavaBeanVar.kt") + public void testJavaBeanVar() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/JavaBeanVar.kt"); + } + + @TestMetadata("JavaBeanVarOfGenericType.kt") + public void testJavaBeanVarOfGenericType() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/JavaBeanVarOfGenericType.kt"); + } + + @TestMetadata("TwoSetters.kt") + public void testTwoSetters() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/javaBean/TwoSetters.kt"); + } + + } + + @TestMetadata("compiler/testData/readJavaBinaryClass/kotlinSignature") + public static class KotlinSignature extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInKotlinSignature() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readJavaBinaryClass/kotlinSignature"), "kt", false); + } + + @TestMetadata("MethodWithFunctionTypes.kt") + public void testMethodWithFunctionTypes() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithFunctionTypes.kt"); + } + + @TestMetadata("MethodWithGenerics.kt") + public void testMethodWithGenerics() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithGenerics.kt"); + } + + @TestMetadata("MethodWithTupleType.kt") + public void testMethodWithTupleType() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTupleType.kt"); + } + + @TestMetadata("MethodWithTypeParameters.kt") + public void testMethodWithTypeParameters() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.kt"); + } + + @TestMetadata("MethodWithVararg.kt") + public void testMethodWithVararg() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithVararg.kt"); + } + + @TestMetadata("compiler/testData/readJavaBinaryClass/kotlinSignature/error") + public static class Error extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInError() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readJavaBinaryClass/kotlinSignature/error"), "kt", false); + } + + @TestMetadata("AddingNullability.kt") + public void testAddingNullability() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/AddingNullability.kt"); + } + + @TestMetadata("ExtraUpperBound.kt") + public void testExtraUpperBound() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/ExtraUpperBound.kt"); + } + + @TestMetadata("MissingUpperBound.kt") + public void testMissingUpperBound() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/MissingUpperBound.kt"); + } + + @TestMetadata("NotVarargReplacedWithVararg.kt") + public void testNotVarargReplacedWithVararg() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); + } + + @TestMetadata("ReturnTypeMissing.kt") + public void testReturnTypeMissing() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/ReturnTypeMissing.kt"); + } + + @TestMetadata("SyntaxError.kt") + public void testSyntaxError() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/SyntaxError.kt"); + } + + @TestMetadata("VarargReplacedWithNotVararg.kt") + public void testVarargReplacedWithNotVararg() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); + } + + @TestMetadata("WrongMethodName.kt") + public void testWrongMethodName() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongMethodName.kt"); + } + + @TestMetadata("WrongReturnTypeStructure.kt") + public void testWrongReturnTypeStructure() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongReturnTypeStructure.kt"); + } + + @TestMetadata("WrongTypeName1.kt") + public void testWrongTypeName1() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeName1.kt"); + } + + @TestMetadata("WrongTypeName2.kt") + public void testWrongTypeName2() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeName2.kt"); + } + + @TestMetadata("WrongTypeName3.kt") + public void testWrongTypeName3() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeName3.kt"); + } + + @TestMetadata("WrongTypeParameterBoundStructure1.kt") + public void testWrongTypeParameterBoundStructure1() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); + } + + @TestMetadata("WrongTypeParameterBoundStructure2.kt") + public void testWrongTypeParameterBoundStructure2() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); + } + + @TestMetadata("WrongTypeParametersCount.kt") + public void testWrongTypeParametersCount() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeParametersCount.kt"); + } + + @TestMetadata("WrongTypeVariance.kt") + public void testWrongTypeVariance() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongTypeVariance.kt"); + } + + @TestMetadata("WrongValueParametersCount.kt") + public void testWrongValueParametersCount() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongValueParametersCount.kt"); + } + + @TestMetadata("WrongValueParameterStructure1.kt") + public void testWrongValueParameterStructure1() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongValueParameterStructure1.kt"); + } + + @TestMetadata("WrongValueParameterStructure2.kt") + public void testWrongValueParameterStructure2() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/kotlinSignature/error/WrongValueParameterStructure2.kt"); + } + + } + + public static Test suite() { + TestSuite suite = new TestSuite("KotlinSignature"); + suite.addTestSuite(KotlinSignature.class); + suite.addTestSuite(Error.class); + return suite; + } + } + + @TestMetadata("compiler/testData/readJavaBinaryClass/modality") + public static class Modality extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInModality() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readJavaBinaryClass/modality"), "kt", false); + } + + @TestMetadata("ModalityOfFakeOverrides.kt") + public void testModalityOfFakeOverrides() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/modality/ModalityOfFakeOverrides.kt"); + } + + } + + @TestMetadata("compiler/testData/readJavaBinaryClass/notNull") + public static class NotNull extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInNotNull() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readJavaBinaryClass/notNull"), "kt", false); + } + + @TestMetadata("NotNullField.kt") + public void testNotNullField() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/notNull/NotNullField.kt"); + } + + @TestMetadata("NotNullMethod.kt") + public void testNotNullMethod() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/notNull/NotNullMethod.kt"); + } + + @TestMetadata("NotNullParameter.kt") + public void testNotNullParameter() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/notNull/NotNullParameter.kt"); + } + + } + + @TestMetadata("compiler/testData/readJavaBinaryClass/vararg") + public static class Vararg extends AbstractLazyResolveNamespaceComparingTest { + public void testAllFilesPresentInVararg() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/readJavaBinaryClass/vararg"), "kt", false); + } + + @TestMetadata("VarargInt.kt") + public void testVarargInt() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/vararg/VarargInt.kt"); + } + + @TestMetadata("VarargString.kt") + public void testVarargString() throws Exception { + doTestSinglePackage("compiler/testData/readJavaBinaryClass/vararg/VarargString.kt"); + } + + } + + public static Test suite() { + TestSuite suite = new TestSuite("ReadJavaBinaryClass"); + suite.addTestSuite(ReadJavaBinaryClass.class); + suite.addTestSuite(Annotation.class); + suite.addTestSuite(Constructor.class); + suite.addTestSuite(JavaBean.class); + suite.addTest(KotlinSignature.suite()); + suite.addTestSuite(Modality.class); + suite.addTestSuite(NotNull.class); + suite.addTestSuite(Vararg.class); + return suite; } } + @TestMetadata("compiler/testData/lazyResolve/namespaceComparator") public static class NamespaceComparator extends AbstractLazyResolveNamespaceComparingTest { - @Test public void testAllFilesPresentInNamespaceComparator() throws Exception { - allTestsPresent(NamespaceComparator.class, new File("compiler/testData/lazyResolve/namespaceComparator"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.LazyResolveTestGenerator", new File("compiler/testData/lazyResolve/namespaceComparator"), "kt", false); } - @Test + @TestMetadata("enum.kt") public void testEnum() throws Exception { doTest("compiler/testData/lazyResolve/namespaceComparator/enum.kt"); } - @Test + @TestMetadata("genericFunction.kt") public void testGenericFunction() throws Exception { doTest("compiler/testData/lazyResolve/namespaceComparator/genericFunction.kt"); } - @Test + @TestMetadata("simpleClass.kt") public void testSimpleClass() throws Exception { doTest("compiler/testData/lazyResolve/namespaceComparator/simpleClass.kt"); } - public static void allTestsPresent(Class clazz, File testDataDir, boolean recursive) { - Set methodNames = new HashSet(); - for (Method method : clazz.getDeclaredMethods()) { - if (method.isAnnotationPresent(Test.class)) { - methodNames.add(method.getName().toLowerCase() + ".kt"); - } - } - for (File file : testDataDir.listFiles()) { - if (file.isDirectory()) { - if (recursive) { - allTestsPresent(clazz, file, recursive); - } - } - else { - String name = file.getName(); - if (name.endsWith(".kt") && !methodNames.contains("test" + name.toLowerCase())) { - Assert.fail("Test data file missing from the generated test class: " + file + "\nPlease re-run the generator: LazyResolveTestGenerator"); - } - } - } - } } + public static Test suite() { + TestSuite suite = new TestSuite("LazyResolveNamespaceComparingTestGenerated"); + suite.addTest(ReadKotlinBinaryClass.suite()); + suite.addTest(ReadJavaBinaryClass.suite()); + suite.addTestSuite(NamespaceComparator.class); + return suite; + } } diff --git a/compiler/tests/org/jetbrains/jet/test/generator/TestGenerator.java b/compiler/tests/org/jetbrains/jet/test/generator/TestGenerator.java index 6689452c98d..4821c8d04e3 100644 --- a/compiler/tests/org/jetbrains/jet/test/generator/TestGenerator.java +++ b/compiler/tests/org/jetbrains/jet/test/generator/TestGenerator.java @@ -18,6 +18,7 @@ package org.jetbrains.jet.test.generator; import com.google.common.collect.Lists; import com.intellij.openapi.util.io.FileUtil; +import junit.framework.TestCase; import org.jetbrains.annotations.NotNull; import java.io.File; @@ -29,100 +30,11 @@ import java.util.*; */ public class TestGenerator { - public interface TargetTestFramework { - List getImports(); - - void generateSuiteClassAnnotations(@NotNull TestGenerator testGenerator, @NotNull Printer p); - void generateExtraSuiteClassMethods(@NotNull TestGenerator testGenerator, @NotNull Printer p); - void generateTestMethodAnnotations(@NotNull TestGenerator testGenerator, @NotNull Printer p); - String getIsTestMethodCondition(@NotNull String methodVariableName); - } - - public enum TargetTestFrameworks implements TargetTestFramework { - JUNIT_3 { - @Override - public List getImports() { - return Arrays.asList( - "junit.framework.Assert", - "junit.framework.Test", - "junit.framework.TestSuite" - ); - } - - @Override - public void generateSuiteClassAnnotations(@NotNull TestGenerator testGenerator, @NotNull Printer p) { - // Do nothing - } - - @Override - public void generateExtraSuiteClassMethods(@NotNull TestGenerator testGenerator, @NotNull Printer p) { - p.println("public static Test suite() {"); - p.pushIndent(); - p.println("TestSuite suite = new TestSuite();"); - - for (TestClassModel testDataSource : testGenerator.testClassModels) { - p.println("suite.addTestSuite(", testDataSource.getName(), ".class);"); - } - - p.println("return suite;"); - p.popIndent(); - p.println("}"); - } - - @Override - public void generateTestMethodAnnotations(@NotNull TestGenerator testGenerator, @NotNull Printer p) { - // Do nothing - } - - @Override - public String getIsTestMethodCondition(@NotNull String methodVariableName) { - return "method.getName().startsWith(\"test\")"; - } - }, - JUNIT_4 { - @Override - public List getImports() { - return Arrays.asList( - "org.junit.Assert", - "org.junit.Test", - "org.junit.runner.RunWith", - "org.junit.runners.Suite" - ); - } - - @Override - public void generateSuiteClassAnnotations(@NotNull TestGenerator testGenerator, @NotNull Printer p) { - p.println("@RunWith(Suite.class)"); - p.println("@Suite.SuiteClasses({"); - p.pushIndent(); - for (Iterator iterator = testGenerator.testClassModels.iterator(); iterator.hasNext(); ) { - TestClassModel testClassModel = iterator.next(); - p.print(testGenerator.suiteClassName, ".", testClassModel.getName(), ".class"); - if (iterator.hasNext()) { - p.printWithNoIndent(","); - } - p.println(); - } - p.popIndent(); - p.println("})"); - } - - @Override - public void generateExtraSuiteClassMethods(@NotNull TestGenerator testGenerator, @NotNull Printer p) { - // Do nothing - } - - @Override - public void generateTestMethodAnnotations(@NotNull TestGenerator testGenerator, @NotNull Printer p) { - p.println("@Test"); - } - - @Override - public String getIsTestMethodCondition(@NotNull String methodVariableName) { - return "method.isAnnotationPresent(Test.class)"; - } - } - } + private static final List JUNIT3_IMPORTS = Arrays.asList( + "junit.framework.Assert", + "junit.framework.Test", + "junit.framework.TestSuite" + ); private final String baseDir; private final String suiteClassPackage; @@ -131,28 +43,14 @@ public class TestGenerator { private final String baseTestClassName; private final Collection testClassModels; private final String generatorName; - private final TargetTestFramework targetTestFramework; public TestGenerator( @NotNull String baseDir, @NotNull String suiteClassPackage, @NotNull String suiteClassName, - @NotNull Class baseTestClass, + @NotNull Class baseTestClass, @NotNull Collection testClassModels, @NotNull Class generatorClass - ) { - this(baseDir, suiteClassPackage, suiteClassName, baseTestClass, testClassModels, - generatorClass, TargetTestFrameworks.JUNIT_4); - } - - public TestGenerator( - @NotNull String baseDir, - @NotNull String suiteClassPackage, - @NotNull String suiteClassName, - @NotNull Class baseTestClass, - @NotNull Collection testClassModels, - @NotNull Class generatorClass, - @NotNull TargetTestFramework targetTestFramework ) { this.baseDir = baseDir; this.suiteClassPackage = suiteClassPackage; @@ -161,7 +59,6 @@ public class TestGenerator { this.baseTestClassName = baseTestClass.getSimpleName(); this.testClassModels = Lists.newArrayList(testClassModels); this.generatorName = generatorClass.getCanonicalName(); - this.targetTestFramework = targetTestFramework; } public void generateAndSave() throws IOException { @@ -171,7 +68,7 @@ public class TestGenerator { p.print(FileUtil.loadFile(new File("injector-generator/copyright.txt"))); p.println("package ", suiteClassPackage, ";"); p.println(); - for (String importedClassName : targetTestFramework.getImports()) { + for (String importedClassName : JUNIT3_IMPORTS) { p.println("import ", importedClassName, ";"); } p.println(); @@ -185,7 +82,6 @@ public class TestGenerator { p.println(); p.println("/** This class is generated by {@link ", generatorName, "}. DO NOT MODIFY MANUALLY */"); - targetTestFramework.generateSuiteClassAnnotations(this, p); if (testClassModels.size() == 1) { TestClassModel theOnlyTestClass = testClassModels.iterator().next(); generateTestClass(p, new DelegatingTestClassModel(theOnlyTestClass) { @@ -288,7 +184,6 @@ public class TestGenerator { } private void generateTestMethod(Printer p, TestMethodModel testMethodModel) { - targetTestFramework.generateTestMethodAnnotations(this, p); generateMetadata(p, testMethodModel); p.println("public void ", testMethodModel.getName(), "() throws Exception {"); p.pushIndent();