Formatter tests: Separate test model for tests with inverted settings
This commit is contained in:
@@ -83,6 +83,7 @@ import org.jetbrains.jet.j2k.test.AbstractJavaToKotlinConverterBasicTest
|
|||||||
import org.jetbrains.jet.plugin.conversion.copy.AbstractJavaToKotlinCopyPasteConversionTest
|
import org.jetbrains.jet.plugin.conversion.copy.AbstractJavaToKotlinCopyPasteConversionTest
|
||||||
import org.jetbrains.jet.shortenRefs.AbstractShortenRefsTest
|
import org.jetbrains.jet.shortenRefs.AbstractShortenRefsTest
|
||||||
import org.jetbrains.jet.completion.handlers.AbstractSmartCompletionHandlerTest
|
import org.jetbrains.jet.completion.handlers.AbstractSmartCompletionHandlerTest
|
||||||
|
import org.jetbrains.jet.generators.tests.generator.TestGeneratorUtil
|
||||||
import org.jetbrains.jet.resolve.AbstractAdditionalLazyResolveDescriptorRendererTest
|
import org.jetbrains.jet.resolve.AbstractAdditionalLazyResolveDescriptorRendererTest
|
||||||
import org.jetbrains.jet.resolve.AbstractReferenceResolveInLibrarySourcesTest
|
import org.jetbrains.jet.resolve.AbstractReferenceResolveInLibrarySourcesTest
|
||||||
|
|
||||||
@@ -414,7 +415,9 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testClass(javaClass<AbstractJetFormatterTest>()) {
|
testClass(javaClass<AbstractJetFormatterTest>()) {
|
||||||
model("formatter", pattern = """^([^\.]+)\.kt$""")
|
model("formatter", pattern = """^([^\.]+)\.after.kt$""")
|
||||||
|
model("formatter", pattern = """^([^\.]+)\.after.inv.kt$""",
|
||||||
|
testMethod = "doTestInverted", testClassName = "FormatterInverted")
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass(javaClass<AbstractDiagnosticMessageTest>()) {
|
testClass(javaClass<AbstractDiagnosticMessageTest>()) {
|
||||||
@@ -482,14 +485,16 @@ private class TestGroup(val testsRoot: String, val testDataRoot: String) {
|
|||||||
extension: String? = "kt", // null string means dir (name without dot)
|
extension: String? = "kt", // null string means dir (name without dot)
|
||||||
pattern: String = if (extension == null) """^([^\.]+)$""" else "^(.+)\\.$extension\$",
|
pattern: String = if (extension == null) """^([^\.]+)$""" else "^(.+)\\.$extension\$",
|
||||||
testMethod: String = "doTest",
|
testMethod: String = "doTest",
|
||||||
singleClass: Boolean = false
|
singleClass: Boolean = false,
|
||||||
|
testClassName: String? = null
|
||||||
) {
|
) {
|
||||||
val rootFile = File(testDataRoot + "/" + relativeRootPath)
|
val rootFile = File(testDataRoot + "/" + relativeRootPath)
|
||||||
val compiledPattern = Pattern.compile(pattern)
|
val compiledPattern = Pattern.compile(pattern)
|
||||||
|
val className = testClassName ?: TestGeneratorUtil.fileNameToJavaIdentifier(rootFile)
|
||||||
testModels.add(if (singleClass)
|
testModels.add(if (singleClass)
|
||||||
SingleClassTestModel(rootFile, compiledPattern, testMethod)
|
SingleClassTestModel(rootFile, compiledPattern, testMethod, className)
|
||||||
else
|
else
|
||||||
SimpleTestClassModel(rootFile, recursive, compiledPattern, testMethod))
|
SimpleTestClassModel(rootFile, recursive, compiledPattern, testMethod, className))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-3
@@ -47,12 +47,18 @@ public class SimpleTestClassModel implements TestClassModel {
|
|||||||
private Collection<TestClassModel> innerTestClasses;
|
private Collection<TestClassModel> innerTestClasses;
|
||||||
private Collection<TestMethodModel> testMethods;
|
private Collection<TestMethodModel> testMethods;
|
||||||
|
|
||||||
public SimpleTestClassModel(@NotNull File rootFile, boolean recursive, @NotNull Pattern filenamePattern, @NotNull String doTestMethodName) {
|
public SimpleTestClassModel(
|
||||||
|
@NotNull File rootFile,
|
||||||
|
boolean recursive,
|
||||||
|
@NotNull Pattern filenamePattern,
|
||||||
|
@NotNull String doTestMethodName,
|
||||||
|
@NotNull String testClassName
|
||||||
|
) {
|
||||||
this.rootFile = rootFile;
|
this.rootFile = rootFile;
|
||||||
this.recursive = recursive;
|
this.recursive = recursive;
|
||||||
this.filenamePattern = filenamePattern;
|
this.filenamePattern = filenamePattern;
|
||||||
this.doTestMethodName = doTestMethodName;
|
this.doTestMethodName = doTestMethodName;
|
||||||
this.testClassName = StringUtil.capitalize(TestGeneratorUtil.escapeForJavaIdentifier(rootFile.getName()));
|
this.testClassName = testClassName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@@ -69,7 +75,8 @@ public class SimpleTestClassModel implements TestClassModel {
|
|||||||
for (File file : files) {
|
for (File file : files) {
|
||||||
if (file.isDirectory()) {
|
if (file.isDirectory()) {
|
||||||
if (dirHasFilesInside(file)) {
|
if (dirHasFilesInside(file)) {
|
||||||
children.add(new SimpleTestClassModel(file, true, filenamePattern, doTestMethodName));
|
String innerTestClassName = TestGeneratorUtil.fileNameToJavaIdentifier(file);
|
||||||
|
children.add(new SimpleTestClassModel(file, true, filenamePattern, doTestMethodName, innerTestClassName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-2
@@ -40,11 +40,16 @@ public class SingleClassTestModel implements TestClassModel {
|
|||||||
|
|
||||||
private Collection<TestMethodModel> testMethods;
|
private Collection<TestMethodModel> testMethods;
|
||||||
|
|
||||||
public SingleClassTestModel(@NotNull File rootFile, @NotNull Pattern filenamePattern, @NotNull String doTestMethodName) {
|
public SingleClassTestModel(
|
||||||
|
@NotNull File rootFile,
|
||||||
|
@NotNull Pattern filenamePattern,
|
||||||
|
@NotNull String doTestMethodName,
|
||||||
|
@NotNull String testClassName
|
||||||
|
) {
|
||||||
this.rootFile = rootFile;
|
this.rootFile = rootFile;
|
||||||
this.filenamePattern = filenamePattern;
|
this.filenamePattern = filenamePattern;
|
||||||
this.doTestMethodName = doTestMethodName;
|
this.doTestMethodName = doTestMethodName;
|
||||||
this.testClassName = StringUtil.capitalize(TestGeneratorUtil.escapeForJavaIdentifier(rootFile.getName()));
|
this.testClassName = testClassName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
@@ -16,7 +16,13 @@
|
|||||||
|
|
||||||
package org.jetbrains.jet.generators.tests.generator;
|
package org.jetbrains.jet.generators.tests.generator;
|
||||||
|
|
||||||
|
import com.intellij.openapi.util.text.StringUtil;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
public class TestGeneratorUtil {
|
public class TestGeneratorUtil {
|
||||||
|
@NotNull
|
||||||
public static String escapeForJavaIdentifier(String fileName) {
|
public static String escapeForJavaIdentifier(String fileName) {
|
||||||
// A file name may contain characters (like ".") that can't be a part of method name
|
// A file name may contain characters (like ".") that can't be a part of method name
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
@@ -32,4 +38,9 @@ public class TestGeneratorUtil {
|
|||||||
}
|
}
|
||||||
return result.toString();
|
return result.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public static String fileNameToJavaIdentifier(@NotNull File file) {
|
||||||
|
return StringUtil.capitalize(escapeForJavaIdentifier(file.getName()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import com.intellij.psi.codeStyle.CodeStyleManager;
|
|||||||
import com.intellij.testFramework.LightIdeaTestCase;
|
import com.intellij.testFramework.LightIdeaTestCase;
|
||||||
import com.intellij.util.IncorrectOperationException;
|
import com.intellij.util.IncorrectOperationException;
|
||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.JetTestUtils;
|
import org.jetbrains.jet.JetTestUtils;
|
||||||
import org.jetbrains.jet.plugin.PluginTestCaseBase;
|
import org.jetbrains.jet.plugin.PluginTestCaseBase;
|
||||||
import org.jetbrains.jet.testing.SettingsConfigurator;
|
import org.jetbrains.jet.testing.SettingsConfigurator;
|
||||||
@@ -125,19 +126,26 @@ public abstract class AbstractJetFormatterTest extends LightIdeaTestCase {
|
|||||||
JetTestUtils.assertEqualsToFile(fileAfter, file.getText());
|
JetTestUtils.assertEqualsToFile(fileAfter, file.getText());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doTest(String testFileNameWithExtension) throws Exception {
|
public void doTest(@NotNull String expectedFileNameWithExtension) throws Exception {
|
||||||
String testFileName = FileUtil.getNameWithoutExtension(testFileNameWithExtension);
|
doTest(expectedFileNameWithExtension, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void doTestInverted(@NotNull String expectedFileNameWithExtension) throws Exception {
|
||||||
|
doTest(expectedFileNameWithExtension, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void doTest(@NotNull String expectedFileNameWithExtension, boolean inverted) throws Exception {
|
||||||
|
String testFileName = expectedFileNameWithExtension.substring(0, expectedFileNameWithExtension.indexOf("."));
|
||||||
String originalFileText = FileUtil.loadFile(new File(testFileName + ".kt"), true);
|
String originalFileText = FileUtil.loadFile(new File(testFileName + ".kt"), true);
|
||||||
SettingsConfigurator configurator = JetFormatSettingsUtil.createConfigurator(originalFileText, JetFormatSettingsUtil.getSettings());
|
SettingsConfigurator configurator = JetFormatSettingsUtil.createConfigurator(originalFileText, JetFormatSettingsUtil.getSettings());
|
||||||
|
|
||||||
configurator.configureSettings();
|
if (!inverted) {
|
||||||
doTextTest(originalFileText, new File(testFileName + ".after.kt"));
|
configurator.configureSettings();
|
||||||
|
|
||||||
String afterInvertedFileName = testFileName + ".after.inv.kt";
|
|
||||||
if (new File(afterInvertedFileName).exists()) {
|
|
||||||
configurator.configureInvertedSettings();
|
|
||||||
doTextTest(originalFileText, new File(afterInvertedFileName));
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
configurator.configureInvertedSettings();
|
||||||
|
}
|
||||||
|
doTextTest(originalFileText, new File(expectedFileNameWithExtension));
|
||||||
|
|
||||||
JetFormatSettingsUtil.getSettings().clearCodeStyleSettings();
|
JetFormatSettingsUtil.getSettings().clearCodeStyleSettings();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 */
|
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
@TestMetadata("idea/testData/formatter")
|
@InnerTestClasses({JetFormatterTestGenerated.Formatter.class, JetFormatterTestGenerated.FormatterInverted.class})
|
||||||
@InnerTestClasses({JetFormatterTestGenerated.ModifierList.class})
|
|
||||||
public class JetFormatterTestGenerated extends AbstractJetFormatterTest {
|
public class JetFormatterTestGenerated extends AbstractJetFormatterTest {
|
||||||
public void testAllFilesPresentInFormatter() throws Exception {
|
@TestMetadata("idea/testData/formatter")
|
||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/formatter"), Pattern.compile("^([^\\.]+)\\.kt$"), true);
|
@InnerTestClasses({Formatter.ModifierList.class})
|
||||||
}
|
public static class Formatter extends AbstractJetFormatterTest {
|
||||||
|
public void testAllFilesPresentInFormatter() throws Exception {
|
||||||
@TestMetadata("BlockFor.kt")
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("idea/testData/formatter"), Pattern.compile("^([^\\.]+)\\.after.kt$"), true);
|
||||||
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("funAnnotationBeforeAnnotation.kt")
|
@TestMetadata("BlockFor.after.kt")
|
||||||
public void testFunAnnotationBeforeAnnotation() throws Exception {
|
public void testBlockFor() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.kt");
|
doTest("idea/testData/formatter/BlockFor.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("funAnnotationBeforeAnnotationEntry.kt")
|
@TestMetadata("Class.after.kt")
|
||||||
public void testFunAnnotationBeforeAnnotationEntry() throws Exception {
|
public void testClass() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.kt");
|
doTest("idea/testData/formatter/Class.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("funAnnotationBeforeModifiers.kt")
|
@TestMetadata("CommentInFunctionLiteral.after.kt")
|
||||||
public void testFunAnnotationBeforeModifiers() throws Exception {
|
public void testCommentInFunctionLiteral() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.kt");
|
doTest("idea/testData/formatter/CommentInFunctionLiteral.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("funAnnotationEntryBeforeAnnotation.kt")
|
@TestMetadata("ConsecutiveCalls.after.kt")
|
||||||
public void testFunAnnotationEntryBeforeAnnotation() throws Exception {
|
public void testConsecutiveCalls() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.kt");
|
doTest("idea/testData/formatter/ConsecutiveCalls.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("funAnnotationEntryBeforeAnnotationEntry.kt")
|
@TestMetadata("DoWhileSpacing.after.kt")
|
||||||
public void testFunAnnotationEntryBeforeAnnotationEntry() throws Exception {
|
public void testDoWhileSpacing() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotationEntry.kt");
|
doTest("idea/testData/formatter/DoWhileSpacing.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("funAnnotationEntryBeforeModifiers.kt")
|
@TestMetadata("EmptyLineAfterPackage.after.kt")
|
||||||
public void testFunAnnotationEntryBeforeModifiers() throws Exception {
|
public void testEmptyLineAfterPackage() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeModifiers.kt");
|
doTest("idea/testData/formatter/EmptyLineAfterPackage.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("funModifierBeforeAnnotation.kt")
|
@TestMetadata("ForNoBraces.after.kt")
|
||||||
public void testFunModifierBeforeAnnotation() throws Exception {
|
public void testForNoBraces() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/funModifierBeforeAnnotation.kt");
|
doTest("idea/testData/formatter/ForNoBraces.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("funModifierBeforeAnnotationEntry.kt")
|
@TestMetadata("ForSpacing.after.kt")
|
||||||
public void testFunModifierBeforeAnnotationEntry() throws Exception {
|
public void testForSpacing() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/funModifierBeforeAnnotationEntry.kt");
|
doTest("idea/testData/formatter/ForSpacing.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("funModifierBeforeModifiers.kt")
|
@TestMetadata("FunctionCallParametersAlign.after.kt")
|
||||||
public void testFunModifierBeforeModifiers() throws Exception {
|
public void testFunctionCallParametersAlign() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/funModifierBeforeModifiers.kt");
|
doTest("idea/testData/formatter/FunctionCallParametersAlign.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("funTheOnlyModifier.kt")
|
@TestMetadata("FunctionDefParametersAlign.after.kt")
|
||||||
public void testFunTheOnlyModifier() throws Exception {
|
public void testFunctionDefParametersAlign() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/funTheOnlyModifier.kt");
|
doTest("idea/testData/formatter/FunctionDefParametersAlign.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("memberFunTheOnlyModifier.kt")
|
@TestMetadata("FunctionWithInference.after.kt")
|
||||||
public void testMemberFunTheOnlyModifier() throws Exception {
|
public void testFunctionWithInference() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/memberFunTheOnlyModifier.kt");
|
doTest("idea/testData/formatter/FunctionWithInference.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("memberValTheOnlyModifier.kt")
|
@TestMetadata("FunctionWithNewLineBrace.after.kt")
|
||||||
public void testMemberValTheOnlyModifier() throws Exception {
|
public void testFunctionWithNewLineBrace() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/memberValTheOnlyModifier.kt");
|
doTest("idea/testData/formatter/FunctionWithNewLineBrace.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("memberVarTheOnlyModifier.kt")
|
@TestMetadata("FunctionalType.after.kt")
|
||||||
public void testMemberVarTheOnlyModifier() throws Exception {
|
public void testFunctionalType() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/memberVarTheOnlyModifier.kt");
|
doTest("idea/testData/formatter/FunctionalType.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("secondMemberFunTheOnlyModifier.kt")
|
@TestMetadata("GetterAndSetter.after.kt")
|
||||||
public void testSecondMemberFunTheOnlyModifier() throws Exception {
|
public void testGetterAndSetter() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/secondMemberFunTheOnlyModifier.kt");
|
doTest("idea/testData/formatter/GetterAndSetter.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("secondMemberValTheOnlyModifier.kt")
|
@TestMetadata("If.after.kt")
|
||||||
public void testSecondMemberValTheOnlyModifier() throws Exception {
|
public void testIf() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/secondMemberValTheOnlyModifier.kt");
|
doTest("idea/testData/formatter/If.after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("secondMemberVarTheOnlyModifier.kt")
|
@TestMetadata("IfElseRemoveLineBreak.after.kt")
|
||||||
public void testSecondMemberVarTheOnlyModifier() throws Exception {
|
public void testIfElseRemoveLineBreak() throws Exception {
|
||||||
doTest("idea/testData/formatter/modifierList/secondMemberVarTheOnlyModifier.kt");
|
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() {
|
public static Test suite() {
|
||||||
TestSuite suite = new TestSuite("JetFormatterTestGenerated");
|
TestSuite suite = new TestSuite("JetFormatterTestGenerated");
|
||||||
suite.addTestSuite(JetFormatterTestGenerated.class);
|
suite.addTest(Formatter.innerSuite());
|
||||||
suite.addTestSuite(ModifierList.class);
|
suite.addTest(FormatterInverted.innerSuite());
|
||||||
return suite;
|
return suite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user