Follow up for PR #458: Generate test data

This commit is contained in:
Alexey Sedunov
2014-05-13 21:19:03 +04:00
parent 355a3eb4e1
commit 34e5460d8a
@@ -30,7 +30,7 @@ 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.DoubleBangToIfThen.class, CodeTransformationTestGenerated.IfThenToDoubleBang.class, 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, CodeTransformationTestGenerated.SimplifyNegatedBinaryExpressionIntention.class, CodeTransformationTestGenerated.ConvertNegatedBooleanSequence.class, CodeTransformationTestGenerated.ConvertNegatedExpressionWithDemorgansLaw.class, CodeTransformationTestGenerated.SwapBinaryExpression.class, CodeTransformationTestGenerated.SplitIf.class, CodeTransformationTestGenerated.ReplaceWithOperatorAssign.class, CodeTransformationTestGenerated.ReplaceWithTraditionalAssignment.class, CodeTransformationTestGenerated.SimplifyBooleanWithConstants.class, CodeTransformationTestGenerated.InsertExplicitTypeArguments.class, CodeTransformationTestGenerated.RemoveExplicitTypeArguments.class, CodeTransformationTestGenerated.ConvertAssertToIf.class, CodeTransformationTestGenerated.ConvertIfToAssert.class, CodeTransformationTestGenerated.MakeTypeExplicitInLambda.class, CodeTransformationTestGenerated.MakeTypeImplicitInLambda.class, CodeTransformationTestGenerated.InvertIfCondition.class, CodeTransformationTestGenerated.ConvertToForEachLoop.class, CodeTransformationTestGenerated.ConvertToForEachFunctionCall.class})
@InnerTestClasses({CodeTransformationTestGenerated.DoubleBangToIfThen.class, CodeTransformationTestGenerated.IfThenToDoubleBang.class, 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, CodeTransformationTestGenerated.SimplifyNegatedBinaryExpressionIntention.class, CodeTransformationTestGenerated.ConvertNegatedBooleanSequence.class, CodeTransformationTestGenerated.ConvertNegatedExpressionWithDemorgansLaw.class, CodeTransformationTestGenerated.SwapBinaryExpression.class, CodeTransformationTestGenerated.SplitIf.class, CodeTransformationTestGenerated.ReplaceWithOperatorAssign.class, CodeTransformationTestGenerated.ReplaceWithTraditionalAssignment.class, CodeTransformationTestGenerated.SimplifyBooleanWithConstants.class, CodeTransformationTestGenerated.InsertExplicitTypeArguments.class, CodeTransformationTestGenerated.RemoveExplicitTypeArguments.class, CodeTransformationTestGenerated.ConvertAssertToIf.class, CodeTransformationTestGenerated.ConvertIfToAssert.class, CodeTransformationTestGenerated.MakeTypeExplicitInLambda.class, CodeTransformationTestGenerated.MakeTypeImplicitInLambda.class, CodeTransformationTestGenerated.InvertIfCondition.class, CodeTransformationTestGenerated.OperatorToFunction.class, CodeTransformationTestGenerated.ConvertToForEachLoop.class, CodeTransformationTestGenerated.ConvertToForEachFunctionCall.class})
public class CodeTransformationTestGenerated extends AbstractCodeTransformationTest {
@TestMetadata("idea/testData/intentions/branched/doubleBangToIfThen")
public static class DoubleBangToIfThen extends AbstractCodeTransformationTest {
@@ -4213,6 +4213,114 @@ public class CodeTransformationTestGenerated extends AbstractCodeTransformationT
}
@TestMetadata("idea/testData/intentions/operatorToFunction")
public static class OperatorToFunction extends AbstractCodeTransformationTest {
public void testAllFilesPresentInOperatorToFunction() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/intentions/operatorToFunction"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("arrayAccessMultipleIndex.kt")
public void testArrayAccessMultipleIndex() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/arrayAccessMultipleIndex.kt");
}
@TestMetadata("arrayAccessOneIndex.kt")
public void testArrayAccessOneIndex() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/arrayAccessOneIndex.kt");
}
@TestMetadata("arrayAssignmentMultipleIndex.kt")
public void testArrayAssignmentMultipleIndex() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/arrayAssignmentMultipleIndex.kt");
}
@TestMetadata("binaryEqualsEqualsNullableOperands.kt")
public void testBinaryEqualsEqualsNullableOperands() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/binaryEqualsEqualsNullableOperands.kt");
}
@TestMetadata("binaryNotEqualsNonNullableOperands.kt")
public void testBinaryNotEqualsNonNullableOperands() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/binaryNotEqualsNonNullableOperands.kt");
}
@TestMetadata("binaryNotIn.kt")
public void testBinaryNotIn() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/binaryNotIn.kt");
}
@TestMetadata("binaryPlus.kt")
public void testBinaryPlus() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/binaryPlus.kt");
}
@TestMetadata("binaryPlusEquals.kt")
public void testBinaryPlusEquals() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/binaryPlusEquals.kt");
}
@TestMetadata("binaryPlusEqualsNotResolved.kt")
public void testBinaryPlusEqualsNotResolved() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/binaryPlusEqualsNotResolved.kt");
}
@TestMetadata("binaryRangeTo.kt")
public void testBinaryRangeTo() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/binaryRangeTo.kt");
}
@TestMetadata("functionCallMultipleArgument.kt")
public void testFunctionCallMultipleArgument() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/functionCallMultipleArgument.kt");
}
@TestMetadata("functionCallWithMultipleArgumentsAndSingleLambda.kt")
public void testFunctionCallWithMultipleArgumentsAndSingleLambda() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/functionCallWithMultipleArgumentsAndSingleLambda.kt");
}
@TestMetadata("functionCallWithSingleLambda.kt")
public void testFunctionCallWithSingleLambda() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/functionCallWithSingleLambda.kt");
}
@TestMetadata("notApplicableAssignment.kt")
public void testNotApplicableAssignment() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/notApplicableAssignment.kt");
}
@TestMetadata("notApplicableCallWithInvokeMethod.kt")
public void testNotApplicableCallWithInvokeMethod() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/notApplicableCallWithInvokeMethod.kt");
}
@TestMetadata("notApplicableFunctionCallWithCallableReference.kt")
public void testNotApplicableFunctionCallWithCallableReference() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/notApplicableFunctionCallWithCallableReference.kt");
}
@TestMetadata("notApplicableNewClassObject.kt")
public void testNotApplicableNewClassObject() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/notApplicableNewClassObject.kt");
}
@TestMetadata("postfixMinusMinus.kt")
public void testPostfixMinusMinus() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/postfixMinusMinus.kt");
}
@TestMetadata("prefixPlus.kt")
public void testPrefixPlus() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/prefixPlus.kt");
}
@TestMetadata("prefixPlusPlus.kt")
public void testPrefixPlusPlus() throws Exception {
doTestOperatorToFunction("idea/testData/intentions/operatorToFunction/prefixPlusPlus.kt");
}
}
@TestMetadata("idea/testData/intentions/convertToForEachLoop")
public static class ConvertToForEachLoop extends AbstractCodeTransformationTest {
public void testAllFilesPresentInConvertToForEachLoop() throws Exception {
@@ -4373,6 +4481,7 @@ public class CodeTransformationTestGenerated extends AbstractCodeTransformationT
suite.addTestSuite(MakeTypeExplicitInLambda.class);
suite.addTestSuite(MakeTypeImplicitInLambda.class);
suite.addTestSuite(InvertIfCondition.class);
suite.addTestSuite(OperatorToFunction.class);
suite.addTestSuite(ConvertToForEachLoop.class);
suite.addTestSuite(ConvertToForEachFunctionCall.class);
return suite;