Generated tests
This commit is contained in:
committed by
Zalim Bashorov
parent
3862a3b5bc
commit
6156a56a4b
+507
-1
@@ -30,8 +30,510 @@ import org.jetbrains.jet.plugin.intentions.AbstractCodeTransformationTest;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@InnerTestClasses({CodeTransformationTestGenerated.IfToAssignment.class, CodeTransformationTestGenerated.IfToReturn.class, CodeTransformationTestGenerated.IfToReturnAsymmetrically.class, CodeTransformationTestGenerated.WhenToAssignment.class, CodeTransformationTestGenerated.WhenToReturn.class, CodeTransformationTestGenerated.AssignmentToIf.class, CodeTransformationTestGenerated.AssignmentToWhen.class, CodeTransformationTestGenerated.PropertyToIf.class, CodeTransformationTestGenerated.PropertyToWhen.class, CodeTransformationTestGenerated.ReturnToIf.class, CodeTransformationTestGenerated.ReturnToWhen.class, CodeTransformationTestGenerated.IfToWhen.class, CodeTransformationTestGenerated.WhenToIf.class, CodeTransformationTestGenerated.Flatten.class, CodeTransformationTestGenerated.Merge.class, CodeTransformationTestGenerated.IntroduceSubject.class, CodeTransformationTestGenerated.EliminateSubject.class, CodeTransformationTestGenerated.Split.class, CodeTransformationTestGenerated.Join.class, CodeTransformationTestGenerated.ConvertMemberToExtension.class, CodeTransformationTestGenerated.ReconstructedType.class, CodeTransformationTestGenerated.RemoveUnnecessaryParentheses.class, CodeTransformationTestGenerated.ReplaceWithDotQualifiedMethodCall.class, CodeTransformationTestGenerated.ReplaceWithInfixFunctionCall.class, CodeTransformationTestGenerated.RemoveCurlyBracesFromTemplate.class, CodeTransformationTestGenerated.MoveLambdaInsideParentheses.class, CodeTransformationTestGenerated.MoveLambdaOutsideParentheses.class, CodeTransformationTestGenerated.ReplaceExplicitFunctionLiteralParamWithIt.class, CodeTransformationTestGenerated.ReplaceItWithExplicitFunctionLiteralParam.class, CodeTransformationTestGenerated.RemoveBraces.class, CodeTransformationTestGenerated.AddBraces.class, CodeTransformationTestGenerated.ReplaceGetIntention.class, CodeTransformationTestGenerated.ReplaceContainsIntention.class, CodeTransformationTestGenerated.ReplaceBinaryInfixIntention.class, CodeTransformationTestGenerated.ReplaceUnaryPrefixIntention.class, CodeTransformationTestGenerated.ReplaceInvokeIntention.class})
|
||||
@InnerTestClasses({CodeTransformationTestGenerated.ElvisToIfThen.class, CodeTransformationTestGenerated.IfThenToElvis.class, CodeTransformationTestGenerated.SafeAccessToIfThen.class, CodeTransformationTestGenerated.IfThenToSafeAccess.class, CodeTransformationTestGenerated.IfToAssignment.class, CodeTransformationTestGenerated.IfToReturn.class, CodeTransformationTestGenerated.IfToReturnAsymmetrically.class, CodeTransformationTestGenerated.WhenToAssignment.class, CodeTransformationTestGenerated.WhenToReturn.class, CodeTransformationTestGenerated.AssignmentToIf.class, CodeTransformationTestGenerated.AssignmentToWhen.class, CodeTransformationTestGenerated.PropertyToIf.class, CodeTransformationTestGenerated.PropertyToWhen.class, CodeTransformationTestGenerated.ReturnToIf.class, CodeTransformationTestGenerated.ReturnToWhen.class, CodeTransformationTestGenerated.IfToWhen.class, CodeTransformationTestGenerated.WhenToIf.class, CodeTransformationTestGenerated.Flatten.class, CodeTransformationTestGenerated.Merge.class, CodeTransformationTestGenerated.IntroduceSubject.class, CodeTransformationTestGenerated.EliminateSubject.class, CodeTransformationTestGenerated.Split.class, CodeTransformationTestGenerated.Join.class, CodeTransformationTestGenerated.ConvertMemberToExtension.class, CodeTransformationTestGenerated.ReconstructedType.class, CodeTransformationTestGenerated.RemoveUnnecessaryParentheses.class, CodeTransformationTestGenerated.ReplaceWithDotQualifiedMethodCall.class, CodeTransformationTestGenerated.ReplaceWithInfixFunctionCall.class, CodeTransformationTestGenerated.RemoveCurlyBracesFromTemplate.class, CodeTransformationTestGenerated.MoveLambdaInsideParentheses.class, CodeTransformationTestGenerated.MoveLambdaOutsideParentheses.class, CodeTransformationTestGenerated.ReplaceExplicitFunctionLiteralParamWithIt.class, CodeTransformationTestGenerated.ReplaceItWithExplicitFunctionLiteralParam.class, CodeTransformationTestGenerated.RemoveBraces.class, CodeTransformationTestGenerated.AddBraces.class, CodeTransformationTestGenerated.ReplaceGetIntention.class, CodeTransformationTestGenerated.ReplaceContainsIntention.class, CodeTransformationTestGenerated.ReplaceBinaryInfixIntention.class, CodeTransformationTestGenerated.ReplaceUnaryPrefixIntention.class, CodeTransformationTestGenerated.ReplaceInvokeIntention.class})
|
||||
public class CodeTransformationTestGenerated extends AbstractCodeTransformationTest {
|
||||
@TestMetadata("idea/testData/intentions/branched/elvisToIfThen")
|
||||
public static class ElvisToIfThen extends AbstractCodeTransformationTest {
|
||||
public void testAllFilesPresentInElvisToIfThen() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/intentions/branched/elvisToIfThen"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("callExpression.kt")
|
||||
public void testCallExpression() throws Exception {
|
||||
doTestElvisToIfThen("idea/testData/intentions/branched/elvisToIfThen/callExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("callExpressionParens.kt")
|
||||
public void testCallExpressionParens() throws Exception {
|
||||
doTestElvisToIfThen("idea/testData/intentions/branched/elvisToIfThen/callExpressionParens.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("elvisAsExpression.kt")
|
||||
public void testElvisAsExpression() throws Exception {
|
||||
doTestElvisToIfThen("idea/testData/intentions/branched/elvisToIfThen/elvisAsExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localValLhs.kt")
|
||||
public void testLocalValLhs() throws Exception {
|
||||
doTestElvisToIfThen("idea/testData/intentions/branched/elvisToIfThen/localValLhs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localVarLhs.kt")
|
||||
public void testLocalVarLhs() throws Exception {
|
||||
doTestElvisToIfThen("idea/testData/intentions/branched/elvisToIfThen/localVarLhs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleNameExpression.kt")
|
||||
public void testSimpleNameExpression() throws Exception {
|
||||
doTestElvisToIfThen("idea/testData/intentions/branched/elvisToIfThen/simpleNameExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleNameExpressionInParens.kt")
|
||||
public void testSimpleNameExpressionInParens() throws Exception {
|
||||
doTestElvisToIfThen("idea/testData/intentions/branched/elvisToIfThen/simpleNameExpressionInParens.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelVal.kt")
|
||||
public void testTopLevelVal() throws Exception {
|
||||
doTestElvisToIfThen("idea/testData/intentions/branched/elvisToIfThen/topLevelVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelValCustomGetter.kt")
|
||||
public void testTopLevelValCustomGetter() throws Exception {
|
||||
doTestElvisToIfThen("idea/testData/intentions/branched/elvisToIfThen/topLevelValCustomGetter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelVar.kt")
|
||||
public void testTopLevelVar() throws Exception {
|
||||
doTestElvisToIfThen("idea/testData/intentions/branched/elvisToIfThen/topLevelVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelVarCustomGetter.kt")
|
||||
public void testTopLevelVarCustomGetter() throws Exception {
|
||||
doTestElvisToIfThen("idea/testData/intentions/branched/elvisToIfThen/topLevelVarCustomGetter.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/intentions/branched/ifThenToElvis")
|
||||
public static class IfThenToElvis extends AbstractCodeTransformationTest {
|
||||
public void testAllFilesPresentInIfThenToElvis() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/intentions/branched/ifThenToElvis"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("blockHasMoreThanOneStatement.kt")
|
||||
public void testBlockHasMoreThanOneStatement() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/blockHasMoreThanOneStatement.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("blockUsesDifferentVar.kt")
|
||||
public void testBlockUsesDifferentVar() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/blockUsesDifferentVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("conditionComparesNullWithNull.kt")
|
||||
public void testConditionComparesNullWithNull() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/conditionComparesNullWithNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("conditionInvalidBinaryExp.kt")
|
||||
public void testConditionInvalidBinaryExp() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/conditionInvalidBinaryExp.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("conditionNotBinaryExpr.kt")
|
||||
public void testConditionNotBinaryExpr() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/conditionNotBinaryExpr.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("doesNotinlineValueIfUsedMoreThanOnce.kt")
|
||||
public void testDoesNotinlineValueIfUsedMoreThanOnce() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/doesNotinlineValueIfUsedMoreThanOnce.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("doesNotinlineValueOutsideOfScope.kt")
|
||||
public void testDoesNotinlineValueOutsideOfScope() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/doesNotinlineValueOutsideOfScope.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyCondition.kt")
|
||||
public void testEmptyCondition() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/emptyCondition.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyElseBlock.kt")
|
||||
public void testEmptyElseBlock() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/emptyElseBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyThenBlock.kt")
|
||||
public void testEmptyThenBlock() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/emptyThenBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ifAndElseBothInBlocks.kt")
|
||||
public void testIfAndElseBothInBlocks() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/ifAndElseBothInBlocks.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ifAndElseNotInBlocks.kt")
|
||||
public void testIfAndElseNotInBlocks() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/ifAndElseNotInBlocks.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ifAsExpression.kt")
|
||||
public void testIfAsExpression() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/ifAsExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lhsEqualsNull.kt")
|
||||
public void testLhsEqualsNull() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/lhsEqualsNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lhsNotEqualsNull.kt")
|
||||
public void testLhsNotEqualsNull() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/lhsNotEqualsNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("missingElseClause.kt")
|
||||
public void testMissingElseClause() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/missingElseClause.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("missingThenClause.kt")
|
||||
public void testMissingThenClause() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/missingThenClause.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noCondition.kt")
|
||||
public void testNoCondition() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/noCondition.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noNullInCondition.kt")
|
||||
public void testNoNullInCondition() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/noNullInCondition.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("notApplicableForFunction.kt")
|
||||
public void testNotApplicableForFunction() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/notApplicableForFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("notApplicableForLocalVar.kt")
|
||||
public void testNotApplicableForLocalVar() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/notApplicableForLocalVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullBranchAlsoNull.kt")
|
||||
public void testNullBranchAlsoNull() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/nullBranchAlsoNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("otherBlockHasMoreThanOneStatement.kt")
|
||||
public void testOtherBlockHasMoreThanOneStatement() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/otherBlockHasMoreThanOneStatement.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("rhsEqualsNull.kt")
|
||||
public void testRhsEqualsNull() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/rhsEqualsNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("rhsNotEqualsNull.kt")
|
||||
public void testRhsNotEqualsNull() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/rhsNotEqualsNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("thenAndElseBothNull.kt")
|
||||
public void testThenAndElseBothNull() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/thenAndElseBothNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("willNotInlineClassProperty.kt")
|
||||
public void testWillNotInlineClassProperty() throws Exception {
|
||||
doTestIfThenToElvis("idea/testData/intentions/branched/ifThenToElvis/willNotInlineClassProperty.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/intentions/branched/safeAccessToIfThen")
|
||||
public static class SafeAccessToIfThen extends AbstractCodeTransformationTest {
|
||||
public void testAllFilesPresentInSafeAccessToIfThen() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/intentions/branched/safeAccessToIfThen"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("binaryExpressionLhs.kt")
|
||||
public void testBinaryExpressionLhs() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/binaryExpressionLhs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("callExpression.kt")
|
||||
public void testCallExpression() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/callExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("callExpressionParens.kt")
|
||||
public void testCallExpressionParens() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/callExpressionParens.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("customGetterAsReceiver.kt")
|
||||
public void testCustomGetterAsReceiver() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/customGetterAsReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localValAsReceiver.kt")
|
||||
public void testLocalValAsReceiver() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/localValAsReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localValLhs.kt")
|
||||
public void testLocalValLhs() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/localValLhs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localVarLhs.kt")
|
||||
public void testLocalVarLhs() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/localVarLhs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("resultAssignedToLocalVal.kt")
|
||||
public void testResultAssignedToLocalVal() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/resultAssignedToLocalVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("safeAccessAsFunctionArgument.kt")
|
||||
public void testSafeAccessAsFunctionArgument() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/safeAccessAsFunctionArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleNameExpression.kt")
|
||||
public void testSimpleNameExpression() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/simpleNameExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleNameExpressionInParens.kt")
|
||||
public void testSimpleNameExpressionInParens() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/simpleNameExpressionInParens.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simplePropertyAsReceiver.kt")
|
||||
public void testSimplePropertyAsReceiver() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/simplePropertyAsReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simplePropertyAsReceiver2.kt")
|
||||
public void testSimplePropertyAsReceiver2() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/simplePropertyAsReceiver2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simplePropertyAsReceiver3.kt")
|
||||
public void testSimplePropertyAsReceiver3() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/simplePropertyAsReceiver3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelVal.kt")
|
||||
public void testTopLevelVal() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/topLevelVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelValCustomGetter.kt")
|
||||
public void testTopLevelValCustomGetter() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/topLevelValCustomGetter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelVar.kt")
|
||||
public void testTopLevelVar() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/topLevelVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelVarCustomGetter.kt")
|
||||
public void testTopLevelVarCustomGetter() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/topLevelVarCustomGetter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("usedAsFunctionRhs.kt")
|
||||
public void testUsedAsFunctionRhs() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/usedAsFunctionRhs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("usedAsResultOfCheckedIf.kt")
|
||||
public void testUsedAsResultOfCheckedIf() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/usedAsResultOfCheckedIf.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("usedAsReturnValue.kt")
|
||||
public void testUsedAsReturnValue() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/usedAsReturnValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("usedInUncheckedIfExpression.kt")
|
||||
public void testUsedInUncheckedIfExpression() throws Exception {
|
||||
doTestSafeAccessToIfThen("idea/testData/intentions/branched/safeAccessToIfThen/usedInUncheckedIfExpression.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/intentions/branched/ifThenToSafeAccess")
|
||||
public static class IfThenToSafeAccess extends AbstractCodeTransformationTest {
|
||||
public void testAllFilesPresentInIfThenToSafeAccess() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/intentions/branched/ifThenToSafeAccess"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("blockHasMoreThanOneStatement.kt")
|
||||
public void testBlockHasMoreThanOneStatement() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/blockHasMoreThanOneStatement.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("blockUsesDifferentVar.kt")
|
||||
public void testBlockUsesDifferentVar() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/blockUsesDifferentVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("conditionComparesNullWithNull.kt")
|
||||
public void testConditionComparesNullWithNull() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/conditionComparesNullWithNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("conditionInvalidBinaryExp.kt")
|
||||
public void testConditionInvalidBinaryExp() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/conditionInvalidBinaryExp.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("conditionNotBinaryExpr.kt")
|
||||
public void testConditionNotBinaryExpr() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/conditionNotBinaryExpr.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("doesNotinlineValueIfUsedMoreThanOnce.kt")
|
||||
public void testDoesNotinlineValueIfUsedMoreThanOnce() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/doesNotinlineValueIfUsedMoreThanOnce.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("doesNotinlineValueOutsideOfScope.kt")
|
||||
public void testDoesNotinlineValueOutsideOfScope() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/doesNotinlineValueOutsideOfScope.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyCondition.kt")
|
||||
public void testEmptyCondition() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/emptyCondition.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyElseBlock.kt")
|
||||
public void testEmptyElseBlock() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/emptyElseBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyThenBlock.kt")
|
||||
public void testEmptyThenBlock() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/emptyThenBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ifAndElseBothInBlocks.kt")
|
||||
public void testIfAndElseBothInBlocks() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/ifAndElseBothInBlocks.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ifAndElseNotInBlocks.kt")
|
||||
public void testIfAndElseNotInBlocks() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/ifAndElseNotInBlocks.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ifAsExpression.kt")
|
||||
public void testIfAsExpression() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/ifAsExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lhsEqualsNull.kt")
|
||||
public void testLhsEqualsNull() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/lhsEqualsNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lhsNotEqualsNull.kt")
|
||||
public void testLhsNotEqualsNull() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/lhsNotEqualsNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("missingNecessaryElseClause.kt")
|
||||
public void testMissingNecessaryElseClause() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/missingNecessaryElseClause.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("missingNecessaryThenClause.kt")
|
||||
public void testMissingNecessaryThenClause() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/missingNecessaryThenClause.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noCondition.kt")
|
||||
public void testNoCondition() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/noCondition.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noElseBlock.kt")
|
||||
public void testNoElseBlock() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/noElseBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noNullInCondition.kt")
|
||||
public void testNoNullInCondition() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/noNullInCondition.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noNullInCondition2.kt")
|
||||
public void testNoNullInCondition2() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/noNullInCondition2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noThenBlock.kt")
|
||||
public void testNoThenBlock() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/noThenBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("notApplicableForFunction.kt")
|
||||
public void testNotApplicableForFunction() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/notApplicableForFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("notApplicableForLocalVar.kt")
|
||||
public void testNotApplicableForLocalVar() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/notApplicableForLocalVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("otherBlockHasMoreThanOneStatement.kt")
|
||||
public void testOtherBlockHasMoreThanOneStatement() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/otherBlockHasMoreThanOneStatement.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("rhsEqualsNull.kt")
|
||||
public void testRhsEqualsNull() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/rhsEqualsNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("rhsNotEqualsNull.kt")
|
||||
public void testRhsNotEqualsNull() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/rhsNotEqualsNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("thenAndElseBothNull.kt")
|
||||
public void testThenAndElseBothNull() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/thenAndElseBothNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("thenAndElseNotNull.kt")
|
||||
public void testThenAndElseNotNull() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/thenAndElseNotNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unacceptableEmptyElseBlock.kt")
|
||||
public void testUnacceptableEmptyElseBlock() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/unacceptableEmptyElseBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unacceptableEmptyThenBlock.kt")
|
||||
public void testUnacceptableEmptyThenBlock() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/unacceptableEmptyThenBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unacceptableNoElseBlock.kt")
|
||||
public void testUnacceptableNoElseBlock() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/unacceptableNoElseBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unacceptableNoThenBlock.kt")
|
||||
public void testUnacceptableNoThenBlock() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/unacceptableNoThenBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("willNotInlineClassProperty.kt")
|
||||
public void testWillNotInlineClassProperty() throws Exception {
|
||||
doTestIfThenToSafeAccess("idea/testData/intentions/branched/ifThenToSafeAccess/willNotInlineClassProperty.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/intentions/branched/folding/ifToAssignment")
|
||||
public static class IfToAssignment extends AbstractCodeTransformationTest {
|
||||
public void testAllFilesPresentInIfToAssignment() throws Exception {
|
||||
@@ -2082,6 +2584,10 @@ public class CodeTransformationTestGenerated extends AbstractCodeTransformationT
|
||||
|
||||
public static Test suite() {
|
||||
TestSuite suite = new TestSuite("CodeTransformationTestGenerated");
|
||||
suite.addTestSuite(ElvisToIfThen.class);
|
||||
suite.addTestSuite(IfThenToElvis.class);
|
||||
suite.addTestSuite(SafeAccessToIfThen.class);
|
||||
suite.addTestSuite(IfThenToSafeAccess.class);
|
||||
suite.addTestSuite(IfToAssignment.class);
|
||||
suite.addTestSuite(IfToReturn.class);
|
||||
suite.addTestSuite(IfToReturnAsymmetrically.class);
|
||||
|
||||
Reference in New Issue
Block a user