restructured control flow tests

This commit is contained in:
Svetlana Isakova
2014-03-04 19:00:18 +04:00
parent fe349da4d5
commit ec47821567
85 changed files with 317 additions and 203 deletions
@@ -31,220 +31,132 @@ import org.jetbrains.jet.cfg.AbstractControlFlowTest;
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/cfg")
@InnerTestClasses({ControlFlowTestGenerated.DeadCode.class, ControlFlowTestGenerated.TailCalls.class})
@InnerTestClasses({ControlFlowTestGenerated.Arrays.class, ControlFlowTestGenerated.Basic.class, ControlFlowTestGenerated.ControlStructures.class, ControlFlowTestGenerated.Conventions.class, ControlFlowTestGenerated.DeadCode.class, ControlFlowTestGenerated.Declarations.class, ControlFlowTestGenerated.Expressions.class, ControlFlowTestGenerated.TailCalls.class})
public class ControlFlowTestGenerated extends AbstractControlFlowTest {
public void testAllFilesPresentInCfg() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("AnonymousInitializers.kt")
public void testAnonymousInitializers() throws Exception {
doTest("compiler/testData/cfg/AnonymousInitializers.kt");
@TestMetadata("compiler/testData/cfg/arrays")
public static class Arrays extends AbstractControlFlowTest {
public void testAllFilesPresentInArrays() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/arrays"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("ArrayAccess.kt")
public void testArrayAccess() throws Exception {
doTest("compiler/testData/cfg/arrays/ArrayAccess.kt");
}
@TestMetadata("arrayAccessExpression.kt")
public void testArrayAccessExpression() throws Exception {
doTest("compiler/testData/cfg/arrays/arrayAccessExpression.kt");
}
@TestMetadata("ArrayOfFunctions.kt")
public void testArrayOfFunctions() throws Exception {
doTest("compiler/testData/cfg/arrays/ArrayOfFunctions.kt");
}
@TestMetadata("arraySet.kt")
public void testArraySet() throws Exception {
doTest("compiler/testData/cfg/arrays/arraySet.kt");
}
@TestMetadata("arraySetPlusAssign.kt")
public void testArraySetPlusAssign() throws Exception {
doTest("compiler/testData/cfg/arrays/arraySetPlusAssign.kt");
}
}
@TestMetadata("ArrayAccess.kt")
public void testArrayAccess() throws Exception {
doTest("compiler/testData/cfg/ArrayAccess.kt");
@TestMetadata("compiler/testData/cfg/basic")
public static class Basic extends AbstractControlFlowTest {
public void testAllFilesPresentInBasic() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/basic"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("Basic.kt")
public void testBasic() throws Exception {
doTest("compiler/testData/cfg/basic/Basic.kt");
}
@TestMetadata("EmptyFunction.kt")
public void testEmptyFunction() throws Exception {
doTest("compiler/testData/cfg/basic/EmptyFunction.kt");
}
@TestMetadata("ShortFunction.kt")
public void testShortFunction() throws Exception {
doTest("compiler/testData/cfg/basic/ShortFunction.kt");
}
}
@TestMetadata("arrayAccessExpression.kt")
public void testArrayAccessExpression() throws Exception {
doTest("compiler/testData/cfg/arrayAccessExpression.kt");
@TestMetadata("compiler/testData/cfg/controlStructures")
public static class ControlStructures extends AbstractControlFlowTest {
public void testAllFilesPresentInControlStructures() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/controlStructures"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("Finally.kt")
public void testFinally() throws Exception {
doTest("compiler/testData/cfg/controlStructures/Finally.kt");
}
@TestMetadata("FinallyTestCopy.kt")
public void testFinallyTestCopy() throws Exception {
doTest("compiler/testData/cfg/controlStructures/FinallyTestCopy.kt");
}
@TestMetadata("For.kt")
public void testFor() throws Exception {
doTest("compiler/testData/cfg/controlStructures/For.kt");
}
@TestMetadata("If.kt")
public void testIf() throws Exception {
doTest("compiler/testData/cfg/controlStructures/If.kt");
}
@TestMetadata("OnlyWhileInFunctionBody.kt")
public void testOnlyWhileInFunctionBody() throws Exception {
doTest("compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.kt");
}
@TestMetadata("returnsInWhen.kt")
public void testReturnsInWhen() throws Exception {
doTest("compiler/testData/cfg/controlStructures/returnsInWhen.kt");
}
}
@TestMetadata("ArrayOfFunctions.kt")
public void testArrayOfFunctions() throws Exception {
doTest("compiler/testData/cfg/ArrayOfFunctions.kt");
}
@TestMetadata("arraySet.kt")
public void testArraySet() throws Exception {
doTest("compiler/testData/cfg/arraySet.kt");
}
@TestMetadata("arraySetPlusAssign.kt")
public void testArraySetPlusAssign() throws Exception {
doTest("compiler/testData/cfg/arraySetPlusAssign.kt");
}
@TestMetadata("assignmentToThis.kt")
public void testAssignmentToThis() throws Exception {
doTest("compiler/testData/cfg/assignmentToThis.kt");
}
@TestMetadata("Assignments.kt")
public void testAssignments() throws Exception {
doTest("compiler/testData/cfg/Assignments.kt");
}
@TestMetadata("backingFieldAccess.kt")
public void testBackingFieldAccess() throws Exception {
doTest("compiler/testData/cfg/backingFieldAccess.kt");
}
@TestMetadata("backingFieldQualifiedWithThis.kt")
public void testBackingFieldQualifiedWithThis() throws Exception {
doTest("compiler/testData/cfg/backingFieldQualifiedWithThis.kt");
}
@TestMetadata("Basic.kt")
public void testBasic() throws Exception {
doTest("compiler/testData/cfg/Basic.kt");
}
@TestMetadata("chainedQualifiedExpression.kt")
public void testChainedQualifiedExpression() throws Exception {
doTest("compiler/testData/cfg/chainedQualifiedExpression.kt");
}
@TestMetadata("DelegatedProperty.kt")
public void testDelegatedProperty() throws Exception {
doTest("compiler/testData/cfg/DelegatedProperty.kt");
}
@TestMetadata("EmptyFunction.kt")
public void testEmptyFunction() throws Exception {
doTest("compiler/testData/cfg/EmptyFunction.kt");
}
@TestMetadata("equals.kt")
public void testEquals() throws Exception {
doTest("compiler/testData/cfg/equals.kt");
}
@TestMetadata("expressionAsFunction.kt")
public void testExpressionAsFunction() throws Exception {
doTest("compiler/testData/cfg/expressionAsFunction.kt");
}
@TestMetadata("FailFunction.kt")
public void testFailFunction() throws Exception {
doTest("compiler/testData/cfg/FailFunction.kt");
}
@TestMetadata("Finally.kt")
public void testFinally() throws Exception {
doTest("compiler/testData/cfg/Finally.kt");
}
@TestMetadata("FinallyTestCopy.kt")
public void testFinallyTestCopy() throws Exception {
doTest("compiler/testData/cfg/FinallyTestCopy.kt");
}
@TestMetadata("For.kt")
public void testFor() throws Exception {
doTest("compiler/testData/cfg/For.kt");
}
@TestMetadata("If.kt")
public void testIf() throws Exception {
doTest("compiler/testData/cfg/If.kt");
}
@TestMetadata("incrementAtTheEnd.kt")
public void testIncrementAtTheEnd() throws Exception {
doTest("compiler/testData/cfg/incrementAtTheEnd.kt");
}
@TestMetadata("invoke.kt")
public void testInvoke() throws Exception {
doTest("compiler/testData/cfg/invoke.kt");
}
@TestMetadata("LazyBooleans.kt")
public void testLazyBooleans() throws Exception {
doTest("compiler/testData/cfg/LazyBooleans.kt");
}
@TestMetadata("localClass.kt")
public void testLocalClass() throws Exception {
doTest("compiler/testData/cfg/localClass.kt");
}
@TestMetadata("LocalDeclarations.kt")
public void testLocalDeclarations() throws Exception {
doTest("compiler/testData/cfg/LocalDeclarations.kt");
}
@TestMetadata("localProperty.kt")
public void testLocalProperty() throws Exception {
doTest("compiler/testData/cfg/localProperty.kt");
}
@TestMetadata("MultiDecl.kt")
public void testMultiDecl() throws Exception {
doTest("compiler/testData/cfg/MultiDecl.kt");
}
@TestMetadata("multiDeclarationWithError.kt")
public void testMultiDeclarationWithError() throws Exception {
doTest("compiler/testData/cfg/multiDeclarationWithError.kt");
}
@TestMetadata("notEqual.kt")
public void testNotEqual() throws Exception {
doTest("compiler/testData/cfg/notEqual.kt");
}
@TestMetadata("ObjectExpression.kt")
public void testObjectExpression() throws Exception {
doTest("compiler/testData/cfg/ObjectExpression.kt");
}
@TestMetadata("OnlyWhileInFunctionBody.kt")
public void testOnlyWhileInFunctionBody() throws Exception {
doTest("compiler/testData/cfg/OnlyWhileInFunctionBody.kt");
}
@TestMetadata("propertySafeCall.kt")
public void testPropertySafeCall() throws Exception {
doTest("compiler/testData/cfg/propertySafeCall.kt");
}
@TestMetadata("qualifiedExpressionWithoutSelector.kt")
public void testQualifiedExpressionWithoutSelector() throws Exception {
doTest("compiler/testData/cfg/qualifiedExpressionWithoutSelector.kt");
}
@TestMetadata("ReturnFromExpression.kt")
public void testReturnFromExpression() throws Exception {
doTest("compiler/testData/cfg/ReturnFromExpression.kt");
}
@TestMetadata("returnsInWhen.kt")
public void testReturnsInWhen() throws Exception {
doTest("compiler/testData/cfg/returnsInWhen.kt");
}
@TestMetadata("ShortFunction.kt")
public void testShortFunction() throws Exception {
doTest("compiler/testData/cfg/ShortFunction.kt");
}
@TestMetadata("thisExpression.kt")
public void testThisExpression() throws Exception {
doTest("compiler/testData/cfg/thisExpression.kt");
}
@TestMetadata("typeParameter.kt")
public void testTypeParameter() throws Exception {
doTest("compiler/testData/cfg/typeParameter.kt");
}
@TestMetadata("unresolved.kt")
public void testUnresolved() throws Exception {
doTest("compiler/testData/cfg/unresolved.kt");
}
@TestMetadata("unusedExpressionSimpleName.kt")
public void testUnusedExpressionSimpleName() throws Exception {
doTest("compiler/testData/cfg/unusedExpressionSimpleName.kt");
}
@TestMetadata("unusedFunctionLiteral.kt")
public void testUnusedFunctionLiteral() throws Exception {
doTest("compiler/testData/cfg/unusedFunctionLiteral.kt");
@TestMetadata("compiler/testData/cfg/conventions")
public static class Conventions extends AbstractControlFlowTest {
public void testAllFilesPresentInConventions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/conventions"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("equals.kt")
public void testEquals() throws Exception {
doTest("compiler/testData/cfg/conventions/equals.kt");
}
@TestMetadata("incrementAtTheEnd.kt")
public void testIncrementAtTheEnd() throws Exception {
doTest("compiler/testData/cfg/conventions/incrementAtTheEnd.kt");
}
@TestMetadata("invoke.kt")
public void testInvoke() throws Exception {
doTest("compiler/testData/cfg/conventions/invoke.kt");
}
@TestMetadata("notEqual.kt")
public void testNotEqual() throws Exception {
doTest("compiler/testData/cfg/conventions/notEqual.kt");
}
}
@TestMetadata("compiler/testData/cfg/deadCode")
@@ -270,6 +182,202 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
}
@TestMetadata("compiler/testData/cfg/declarations")
@InnerTestClasses({Declarations.ClassesAndObjects.class, Declarations.FunctionLiterals.class, Declarations.Functions.class, Declarations.Local.class, Declarations.MultiDeclaration.class, Declarations.Properties.class})
public static class Declarations extends AbstractControlFlowTest {
public void testAllFilesPresentInDeclarations() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/declarations"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/testData/cfg/declarations/classesAndObjects")
public static class ClassesAndObjects extends AbstractControlFlowTest {
public void testAllFilesPresentInClassesAndObjects() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/declarations/classesAndObjects"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("AnonymousInitializers.kt")
public void testAnonymousInitializers() throws Exception {
doTest("compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt");
}
}
@TestMetadata("compiler/testData/cfg/declarations/functionLiterals")
public static class FunctionLiterals extends AbstractControlFlowTest {
public void testAllFilesPresentInFunctionLiterals() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/declarations/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("unusedFunctionLiteral.kt")
public void testUnusedFunctionLiteral() throws Exception {
doTest("compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.kt");
}
}
@TestMetadata("compiler/testData/cfg/declarations/functions")
public static class Functions extends AbstractControlFlowTest {
public void testAllFilesPresentInFunctions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/declarations/functions"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("FailFunction.kt")
public void testFailFunction() throws Exception {
doTest("compiler/testData/cfg/declarations/functions/FailFunction.kt");
}
@TestMetadata("typeParameter.kt")
public void testTypeParameter() throws Exception {
doTest("compiler/testData/cfg/declarations/functions/typeParameter.kt");
}
}
@TestMetadata("compiler/testData/cfg/declarations/local")
public static class Local extends AbstractControlFlowTest {
public void testAllFilesPresentInLocal() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/declarations/local"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("localClass.kt")
public void testLocalClass() throws Exception {
doTest("compiler/testData/cfg/declarations/local/localClass.kt");
}
@TestMetadata("LocalDeclarations.kt")
public void testLocalDeclarations() throws Exception {
doTest("compiler/testData/cfg/declarations/local/LocalDeclarations.kt");
}
@TestMetadata("localProperty.kt")
public void testLocalProperty() throws Exception {
doTest("compiler/testData/cfg/declarations/local/localProperty.kt");
}
@TestMetadata("ObjectExpression.kt")
public void testObjectExpression() throws Exception {
doTest("compiler/testData/cfg/declarations/local/ObjectExpression.kt");
}
}
@TestMetadata("compiler/testData/cfg/declarations/multiDeclaration")
public static class MultiDeclaration extends AbstractControlFlowTest {
public void testAllFilesPresentInMultiDeclaration() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/declarations/multiDeclaration"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("MultiDecl.kt")
public void testMultiDecl() throws Exception {
doTest("compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.kt");
}
@TestMetadata("multiDeclarationWithError.kt")
public void testMultiDeclarationWithError() throws Exception {
doTest("compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.kt");
}
}
@TestMetadata("compiler/testData/cfg/declarations/properties")
public static class Properties extends AbstractControlFlowTest {
public void testAllFilesPresentInProperties() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/declarations/properties"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("backingFieldAccess.kt")
public void testBackingFieldAccess() throws Exception {
doTest("compiler/testData/cfg/declarations/properties/backingFieldAccess.kt");
}
@TestMetadata("backingFieldQualifiedWithThis.kt")
public void testBackingFieldQualifiedWithThis() throws Exception {
doTest("compiler/testData/cfg/declarations/properties/backingFieldQualifiedWithThis.kt");
}
@TestMetadata("DelegatedProperty.kt")
public void testDelegatedProperty() throws Exception {
doTest("compiler/testData/cfg/declarations/properties/DelegatedProperty.kt");
}
}
public static Test innerSuite() {
TestSuite suite = new TestSuite("Declarations");
suite.addTestSuite(Declarations.class);
suite.addTestSuite(ClassesAndObjects.class);
suite.addTestSuite(FunctionLiterals.class);
suite.addTestSuite(Functions.class);
suite.addTestSuite(Local.class);
suite.addTestSuite(MultiDeclaration.class);
suite.addTestSuite(Properties.class);
return suite;
}
}
@TestMetadata("compiler/testData/cfg/expressions")
public static class Expressions extends AbstractControlFlowTest {
public void testAllFilesPresentInExpressions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/expressions"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("assignmentToThis.kt")
public void testAssignmentToThis() throws Exception {
doTest("compiler/testData/cfg/expressions/assignmentToThis.kt");
}
@TestMetadata("Assignments.kt")
public void testAssignments() throws Exception {
doTest("compiler/testData/cfg/expressions/Assignments.kt");
}
@TestMetadata("chainedQualifiedExpression.kt")
public void testChainedQualifiedExpression() throws Exception {
doTest("compiler/testData/cfg/expressions/chainedQualifiedExpression.kt");
}
@TestMetadata("expressionAsFunction.kt")
public void testExpressionAsFunction() throws Exception {
doTest("compiler/testData/cfg/expressions/expressionAsFunction.kt");
}
@TestMetadata("LazyBooleans.kt")
public void testLazyBooleans() throws Exception {
doTest("compiler/testData/cfg/expressions/LazyBooleans.kt");
}
@TestMetadata("propertySafeCall.kt")
public void testPropertySafeCall() throws Exception {
doTest("compiler/testData/cfg/expressions/propertySafeCall.kt");
}
@TestMetadata("qualifiedExpressionWithoutSelector.kt")
public void testQualifiedExpressionWithoutSelector() throws Exception {
doTest("compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.kt");
}
@TestMetadata("ReturnFromExpression.kt")
public void testReturnFromExpression() throws Exception {
doTest("compiler/testData/cfg/expressions/ReturnFromExpression.kt");
}
@TestMetadata("thisExpression.kt")
public void testThisExpression() throws Exception {
doTest("compiler/testData/cfg/expressions/thisExpression.kt");
}
@TestMetadata("unresolved.kt")
public void testUnresolved() throws Exception {
doTest("compiler/testData/cfg/expressions/unresolved.kt");
}
@TestMetadata("unusedExpressionSimpleName.kt")
public void testUnusedExpressionSimpleName() throws Exception {
doTest("compiler/testData/cfg/expressions/unusedExpressionSimpleName.kt");
}
}
@TestMetadata("compiler/testData/cfg/tailCalls")
public static class TailCalls extends AbstractControlFlowTest {
public void testAllFilesPresentInTailCalls() throws Exception {
@@ -306,7 +414,13 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
public static Test suite() {
TestSuite suite = new TestSuite("ControlFlowTestGenerated");
suite.addTestSuite(ControlFlowTestGenerated.class);
suite.addTestSuite(Arrays.class);
suite.addTestSuite(Basic.class);
suite.addTestSuite(ControlStructures.class);
suite.addTestSuite(Conventions.class);
suite.addTestSuite(DeadCode.class);
suite.addTest(Declarations.innerSuite());
suite.addTestSuite(Expressions.class);
suite.addTestSuite(TailCalls.class);
return suite;
}