|
|
|
@@ -30,305 +30,389 @@ import org.jetbrains.jet.formatter.AbstractJetFormatterTest;
|
|
|
|
|
|
|
|
|
|
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
|
|
|
|
@SuppressWarnings("all")
|
|
|
|
|
@TestMetadata("idea/testData/formatter")
|
|
|
|
|
@InnerTestClasses({JetFormatterTestGenerated.ModifierList.class})
|
|
|
|
|
@InnerTestClasses({JetFormatterTestGenerated.Formatter.class, JetFormatterTestGenerated.FormatterInverted.class})
|
|
|
|
|
public class JetFormatterTestGenerated extends AbstractJetFormatterTest {
|
|
|
|
|
public void testAllFilesPresentInFormatter() throws Exception {
|
|
|
|
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/formatter"), Pattern.compile("^([^\\.]+)\\.kt$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("BlockFor.kt")
|
|
|
|
|
public void testBlockFor() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/BlockFor.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("Class.kt")
|
|
|
|
|
public void testClass() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/Class.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("CommentInFunctionLiteral.kt")
|
|
|
|
|
public void testCommentInFunctionLiteral() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/CommentInFunctionLiteral.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("ConsecutiveCalls.kt")
|
|
|
|
|
public void testConsecutiveCalls() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/ConsecutiveCalls.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("DoWhileSpacing.kt")
|
|
|
|
|
public void testDoWhileSpacing() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/DoWhileSpacing.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("EmptyLineAfterPackage.kt")
|
|
|
|
|
public void testEmptyLineAfterPackage() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/EmptyLineAfterPackage.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("ForNoBraces.kt")
|
|
|
|
|
public void testForNoBraces() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/ForNoBraces.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("ForSpacing.kt")
|
|
|
|
|
public void testForSpacing() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/ForSpacing.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("FunctionCallParametersAlign.kt")
|
|
|
|
|
public void testFunctionCallParametersAlign() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/FunctionCallParametersAlign.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("FunctionDefParametersAlign.kt")
|
|
|
|
|
public void testFunctionDefParametersAlign() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/FunctionDefParametersAlign.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("FunctionWithInference.kt")
|
|
|
|
|
public void testFunctionWithInference() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/FunctionWithInference.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("FunctionWithNewLineBrace.kt")
|
|
|
|
|
public void testFunctionWithNewLineBrace() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/FunctionWithNewLineBrace.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("FunctionalType.kt")
|
|
|
|
|
public void testFunctionalType() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/FunctionalType.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("GetterAndSetter.kt")
|
|
|
|
|
public void testGetterAndSetter() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/GetterAndSetter.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("If.kt")
|
|
|
|
|
public void testIf() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/If.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("IfElseRemoveLineBreak.kt")
|
|
|
|
|
public void testIfElseRemoveLineBreak() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/IfElseRemoveLineBreak.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("IfElseWithLineBreak.kt")
|
|
|
|
|
public void testIfElseWithLineBreak() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/IfElseWithLineBreak.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("IfElseWithTrickyComments.kt")
|
|
|
|
|
public void testIfElseWithTrickyComments() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/IfElseWithTrickyComments.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("IfSpacing.kt")
|
|
|
|
|
public void testIfSpacing() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/IfSpacing.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("KDoc.kt")
|
|
|
|
|
public void testKDoc() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/KDoc.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("LambdaArrow.kt")
|
|
|
|
|
public void testLambdaArrow() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/LambdaArrow.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("MultilineFunctionLiteral.kt")
|
|
|
|
|
public void testMultilineFunctionLiteral() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/MultilineFunctionLiteral.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("MultilineFunctionLiteralWithParams.kt")
|
|
|
|
|
public void testMultilineFunctionLiteralWithParams() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/MultilineFunctionLiteralWithParams.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("Parameters.kt")
|
|
|
|
|
public void testParameters() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/Parameters.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("PropertyWithInference.kt")
|
|
|
|
|
public void testPropertyWithInference() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/PropertyWithInference.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("ReferenceExpressionFunctionLiteral.kt")
|
|
|
|
|
public void testReferenceExpressionFunctionLiteral() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/ReferenceExpressionFunctionLiteral.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("RemoveSpacesAroundOperations.kt")
|
|
|
|
|
public void testRemoveSpacesAroundOperations() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/RemoveSpacesAroundOperations.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("RightBracketOnNewLine.kt")
|
|
|
|
|
public void testRightBracketOnNewLine() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/RightBracketOnNewLine.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SaveSpacesInDocComments.kt")
|
|
|
|
|
public void testSaveSpacesInDocComments() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SaveSpacesInDocComments.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SingleLineFunctionLiteral.kt")
|
|
|
|
|
public void testSingleLineFunctionLiteral() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SingleLineFunctionLiteral.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SpaceAroundExtendColon.kt")
|
|
|
|
|
public void testSpaceAroundExtendColon() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SpaceAroundExtendColon.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SpaceBeforeFunctionLiteral.kt")
|
|
|
|
|
public void testSpaceBeforeFunctionLiteral() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SpaceBeforeFunctionLiteral.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SpacesAroundOperations.kt")
|
|
|
|
|
public void testSpacesAroundOperations() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SpacesAroundOperations.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SpacesAroundUnaryOperations.kt")
|
|
|
|
|
public void testSpacesAroundUnaryOperations() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SpacesAroundUnaryOperations.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("UnnecessarySpacesInParametersLists.kt")
|
|
|
|
|
public void testUnnecessarySpacesInParametersLists() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/UnnecessarySpacesInParametersLists.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("When.kt")
|
|
|
|
|
public void testWhen() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/When.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("WhenArrow.kt")
|
|
|
|
|
public void testWhenArrow() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/WhenArrow.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("WhenEntryExpr.kt")
|
|
|
|
|
public void testWhenEntryExpr() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/WhenEntryExpr.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("WhenLinesBeforeLbrace.kt")
|
|
|
|
|
public void testWhenLinesBeforeLbrace() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/WhenLinesBeforeLbrace.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("WhileSpacing.kt")
|
|
|
|
|
public void testWhileSpacing() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/WhileSpacing.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/formatter/modifierList")
|
|
|
|
|
public static class ModifierList extends AbstractJetFormatterTest {
|
|
|
|
|
public void testAllFilesPresentInModifierList() throws Exception {
|
|
|
|
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/formatter/modifierList"), Pattern.compile("^([^\\.]+)\\.kt$"), true);
|
|
|
|
|
@TestMetadata("idea/testData/formatter")
|
|
|
|
|
@InnerTestClasses({Formatter.ModifierList.class})
|
|
|
|
|
public static class Formatter extends AbstractJetFormatterTest {
|
|
|
|
|
public void testAllFilesPresentInFormatter() throws Exception {
|
|
|
|
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/formatter"), Pattern.compile("^([^\\.]+)\\.after.kt$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationBeforeAnnotation.kt")
|
|
|
|
|
public void testFunAnnotationBeforeAnnotation() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.kt");
|
|
|
|
|
@TestMetadata("BlockFor.after.kt")
|
|
|
|
|
public void testBlockFor() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/BlockFor.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationBeforeAnnotationEntry.kt")
|
|
|
|
|
public void testFunAnnotationBeforeAnnotationEntry() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.kt");
|
|
|
|
|
@TestMetadata("Class.after.kt")
|
|
|
|
|
public void testClass() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/Class.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationBeforeModifiers.kt")
|
|
|
|
|
public void testFunAnnotationBeforeModifiers() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.kt");
|
|
|
|
|
@TestMetadata("CommentInFunctionLiteral.after.kt")
|
|
|
|
|
public void testCommentInFunctionLiteral() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/CommentInFunctionLiteral.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationEntryBeforeAnnotation.kt")
|
|
|
|
|
public void testFunAnnotationEntryBeforeAnnotation() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.kt");
|
|
|
|
|
@TestMetadata("ConsecutiveCalls.after.kt")
|
|
|
|
|
public void testConsecutiveCalls() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/ConsecutiveCalls.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationEntryBeforeAnnotationEntry.kt")
|
|
|
|
|
public void testFunAnnotationEntryBeforeAnnotationEntry() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotationEntry.kt");
|
|
|
|
|
@TestMetadata("DoWhileSpacing.after.kt")
|
|
|
|
|
public void testDoWhileSpacing() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/DoWhileSpacing.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationEntryBeforeModifiers.kt")
|
|
|
|
|
public void testFunAnnotationEntryBeforeModifiers() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeModifiers.kt");
|
|
|
|
|
@TestMetadata("EmptyLineAfterPackage.after.kt")
|
|
|
|
|
public void testEmptyLineAfterPackage() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/EmptyLineAfterPackage.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funModifierBeforeAnnotation.kt")
|
|
|
|
|
public void testFunModifierBeforeAnnotation() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funModifierBeforeAnnotation.kt");
|
|
|
|
|
@TestMetadata("ForNoBraces.after.kt")
|
|
|
|
|
public void testForNoBraces() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/ForNoBraces.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funModifierBeforeAnnotationEntry.kt")
|
|
|
|
|
public void testFunModifierBeforeAnnotationEntry() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funModifierBeforeAnnotationEntry.kt");
|
|
|
|
|
@TestMetadata("ForSpacing.after.kt")
|
|
|
|
|
public void testForSpacing() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/ForSpacing.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funModifierBeforeModifiers.kt")
|
|
|
|
|
public void testFunModifierBeforeModifiers() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funModifierBeforeModifiers.kt");
|
|
|
|
|
@TestMetadata("FunctionCallParametersAlign.after.kt")
|
|
|
|
|
public void testFunctionCallParametersAlign() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/FunctionCallParametersAlign.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funTheOnlyModifier.kt")
|
|
|
|
|
public void testFunTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funTheOnlyModifier.kt");
|
|
|
|
|
@TestMetadata("FunctionDefParametersAlign.after.kt")
|
|
|
|
|
public void testFunctionDefParametersAlign() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/FunctionDefParametersAlign.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("memberFunTheOnlyModifier.kt")
|
|
|
|
|
public void testMemberFunTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/memberFunTheOnlyModifier.kt");
|
|
|
|
|
@TestMetadata("FunctionWithInference.after.kt")
|
|
|
|
|
public void testFunctionWithInference() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/FunctionWithInference.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("memberValTheOnlyModifier.kt")
|
|
|
|
|
public void testMemberValTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/memberValTheOnlyModifier.kt");
|
|
|
|
|
@TestMetadata("FunctionWithNewLineBrace.after.kt")
|
|
|
|
|
public void testFunctionWithNewLineBrace() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/FunctionWithNewLineBrace.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("memberVarTheOnlyModifier.kt")
|
|
|
|
|
public void testMemberVarTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/memberVarTheOnlyModifier.kt");
|
|
|
|
|
@TestMetadata("FunctionalType.after.kt")
|
|
|
|
|
public void testFunctionalType() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/FunctionalType.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("secondMemberFunTheOnlyModifier.kt")
|
|
|
|
|
public void testSecondMemberFunTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/secondMemberFunTheOnlyModifier.kt");
|
|
|
|
|
@TestMetadata("GetterAndSetter.after.kt")
|
|
|
|
|
public void testGetterAndSetter() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/GetterAndSetter.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("secondMemberValTheOnlyModifier.kt")
|
|
|
|
|
public void testSecondMemberValTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/secondMemberValTheOnlyModifier.kt");
|
|
|
|
|
@TestMetadata("If.after.kt")
|
|
|
|
|
public void testIf() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/If.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("secondMemberVarTheOnlyModifier.kt")
|
|
|
|
|
public void testSecondMemberVarTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/secondMemberVarTheOnlyModifier.kt");
|
|
|
|
|
@TestMetadata("IfElseRemoveLineBreak.after.kt")
|
|
|
|
|
public void testIfElseRemoveLineBreak() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/IfElseRemoveLineBreak.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("IfElseWithLineBreak.after.kt")
|
|
|
|
|
public void testIfElseWithLineBreak() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/IfElseWithLineBreak.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("IfElseWithTrickyComments.after.kt")
|
|
|
|
|
public void testIfElseWithTrickyComments() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/IfElseWithTrickyComments.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("IfSpacing.after.kt")
|
|
|
|
|
public void testIfSpacing() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/IfSpacing.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("KDoc.after.kt")
|
|
|
|
|
public void testKDoc() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/KDoc.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("LambdaArrow.after.kt")
|
|
|
|
|
public void testLambdaArrow() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/LambdaArrow.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("MultilineFunctionLiteral.after.kt")
|
|
|
|
|
public void testMultilineFunctionLiteral() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/MultilineFunctionLiteral.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("MultilineFunctionLiteralWithParams.after.kt")
|
|
|
|
|
public void testMultilineFunctionLiteralWithParams() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/MultilineFunctionLiteralWithParams.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("Parameters.after.kt")
|
|
|
|
|
public void testParameters() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/Parameters.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("PropertyWithInference.after.kt")
|
|
|
|
|
public void testPropertyWithInference() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/PropertyWithInference.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("ReferenceExpressionFunctionLiteral.after.kt")
|
|
|
|
|
public void testReferenceExpressionFunctionLiteral() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/ReferenceExpressionFunctionLiteral.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("RemoveSpacesAroundOperations.after.kt")
|
|
|
|
|
public void testRemoveSpacesAroundOperations() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/RemoveSpacesAroundOperations.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("RightBracketOnNewLine.after.kt")
|
|
|
|
|
public void testRightBracketOnNewLine() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/RightBracketOnNewLine.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SaveSpacesInDocComments.after.kt")
|
|
|
|
|
public void testSaveSpacesInDocComments() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SaveSpacesInDocComments.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SingleLineFunctionLiteral.after.kt")
|
|
|
|
|
public void testSingleLineFunctionLiteral() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SingleLineFunctionLiteral.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SpaceAroundExtendColon.after.kt")
|
|
|
|
|
public void testSpaceAroundExtendColon() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SpaceAroundExtendColon.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SpaceBeforeFunctionLiteral.after.kt")
|
|
|
|
|
public void testSpaceBeforeFunctionLiteral() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SpaceBeforeFunctionLiteral.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SpacesAroundOperations.after.kt")
|
|
|
|
|
public void testSpacesAroundOperations() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SpacesAroundOperations.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SpacesAroundUnaryOperations.after.kt")
|
|
|
|
|
public void testSpacesAroundUnaryOperations() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/SpacesAroundUnaryOperations.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("UnnecessarySpacesInParametersLists.after.kt")
|
|
|
|
|
public void testUnnecessarySpacesInParametersLists() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/UnnecessarySpacesInParametersLists.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("When.after.kt")
|
|
|
|
|
public void testWhen() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/When.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("WhenArrow.after.kt")
|
|
|
|
|
public void testWhenArrow() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/WhenArrow.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("WhenEntryExpr.after.kt")
|
|
|
|
|
public void testWhenEntryExpr() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/WhenEntryExpr.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("WhenLinesBeforeLbrace.after.kt")
|
|
|
|
|
public void testWhenLinesBeforeLbrace() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/WhenLinesBeforeLbrace.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("WhileSpacing.after.kt")
|
|
|
|
|
public void testWhileSpacing() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/WhileSpacing.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/formatter/modifierList")
|
|
|
|
|
public static class ModifierList extends AbstractJetFormatterTest {
|
|
|
|
|
public void testAllFilesPresentInModifierList() throws Exception {
|
|
|
|
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/formatter/modifierList"), Pattern.compile("^([^\\.]+)\\.after.kt$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationBeforeAnnotation.after.kt")
|
|
|
|
|
public void testFunAnnotationBeforeAnnotation() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationBeforeAnnotationEntry.after.kt")
|
|
|
|
|
public void testFunAnnotationBeforeAnnotationEntry() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationBeforeModifiers.after.kt")
|
|
|
|
|
public void testFunAnnotationBeforeModifiers() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationEntryBeforeAnnotation.after.kt")
|
|
|
|
|
public void testFunAnnotationEntryBeforeAnnotation() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationEntryBeforeAnnotationEntry.after.kt")
|
|
|
|
|
public void testFunAnnotationEntryBeforeAnnotationEntry() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotationEntry.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funAnnotationEntryBeforeModifiers.after.kt")
|
|
|
|
|
public void testFunAnnotationEntryBeforeModifiers() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeModifiers.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funModifierBeforeAnnotation.after.kt")
|
|
|
|
|
public void testFunModifierBeforeAnnotation() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funModifierBeforeAnnotation.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funModifierBeforeAnnotationEntry.after.kt")
|
|
|
|
|
public void testFunModifierBeforeAnnotationEntry() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funModifierBeforeAnnotationEntry.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funModifierBeforeModifiers.after.kt")
|
|
|
|
|
public void testFunModifierBeforeModifiers() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funModifierBeforeModifiers.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("funTheOnlyModifier.after.kt")
|
|
|
|
|
public void testFunTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/funTheOnlyModifier.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("memberFunTheOnlyModifier.after.kt")
|
|
|
|
|
public void testMemberFunTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/memberFunTheOnlyModifier.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("memberValTheOnlyModifier.after.kt")
|
|
|
|
|
public void testMemberValTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/memberValTheOnlyModifier.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("memberVarTheOnlyModifier.after.kt")
|
|
|
|
|
public void testMemberVarTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/memberVarTheOnlyModifier.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("secondMemberFunTheOnlyModifier.after.kt")
|
|
|
|
|
public void testSecondMemberFunTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/secondMemberFunTheOnlyModifier.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("secondMemberValTheOnlyModifier.after.kt")
|
|
|
|
|
public void testSecondMemberValTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/secondMemberValTheOnlyModifier.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("secondMemberVarTheOnlyModifier.after.kt")
|
|
|
|
|
public void testSecondMemberVarTheOnlyModifier() throws Exception {
|
|
|
|
|
doTest("idea/testData/formatter/modifierList/secondMemberVarTheOnlyModifier.after.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Test innerSuite() {
|
|
|
|
|
TestSuite suite = new TestSuite("Formatter");
|
|
|
|
|
suite.addTestSuite(Formatter.class);
|
|
|
|
|
suite.addTestSuite(ModifierList.class);
|
|
|
|
|
return suite;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/formatter")
|
|
|
|
|
@InnerTestClasses({})
|
|
|
|
|
public static class FormatterInverted extends AbstractJetFormatterTest {
|
|
|
|
|
public void testAllFilesPresentInFormatterInverted() throws Exception {
|
|
|
|
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/formatter"), Pattern.compile("^([^\\.]+)\\.after.inv.kt$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("FunctionalType.after.inv.kt")
|
|
|
|
|
public void testFunctionalType() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/FunctionalType.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("IfElseWithTrickyComments.after.inv.kt")
|
|
|
|
|
public void testIfElseWithTrickyComments() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/IfElseWithTrickyComments.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("LambdaArrow.after.inv.kt")
|
|
|
|
|
public void testLambdaArrow() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/LambdaArrow.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("MultilineFunctionLiteralWithParams.after.inv.kt")
|
|
|
|
|
public void testMultilineFunctionLiteralWithParams() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/MultilineFunctionLiteralWithParams.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("Parameters.after.inv.kt")
|
|
|
|
|
public void testParameters() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/Parameters.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("RightBracketOnNewLine.after.inv.kt")
|
|
|
|
|
public void testRightBracketOnNewLine() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/RightBracketOnNewLine.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SingleLineFunctionLiteral.after.inv.kt")
|
|
|
|
|
public void testSingleLineFunctionLiteral() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/SingleLineFunctionLiteral.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SpaceAroundExtendColon.after.inv.kt")
|
|
|
|
|
public void testSpaceAroundExtendColon() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/SpaceAroundExtendColon.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SpacesAroundOperations.after.inv.kt")
|
|
|
|
|
public void testSpacesAroundOperations() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/SpacesAroundOperations.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("SpacesAroundUnaryOperations.after.inv.kt")
|
|
|
|
|
public void testSpacesAroundUnaryOperations() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/SpacesAroundUnaryOperations.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("When.after.inv.kt")
|
|
|
|
|
public void testWhen() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/When.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("WhenArrow.after.inv.kt")
|
|
|
|
|
public void testWhenArrow() throws Exception {
|
|
|
|
|
doTestInverted("idea/testData/formatter/WhenArrow.after.inv.kt");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Test innerSuite() {
|
|
|
|
|
TestSuite suite = new TestSuite("FormatterInverted");
|
|
|
|
|
suite.addTestSuite(FormatterInverted.class);
|
|
|
|
|
return suite;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Test suite() {
|
|
|
|
|
TestSuite suite = new TestSuite("JetFormatterTestGenerated");
|
|
|
|
|
suite.addTestSuite(JetFormatterTestGenerated.class);
|
|
|
|
|
suite.addTestSuite(ModifierList.class);
|
|
|
|
|
suite.addTest(Formatter.innerSuite());
|
|
|
|
|
suite.addTest(FormatterInverted.innerSuite());
|
|
|
|
|
return suite;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|