mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[Java. Code Formatting] Add tests for blank lines with rearrangement
IDEA-110857 GitOrigin-RevId: f21d7c0a9decf830d76c5a25085f4f77448971a8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
37c6900424
commit
a01e2c2c9f
@@ -0,0 +1,11 @@
|
||||
package org.example;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClassWithAnnotations {
|
||||
private static final Boolean SIMPLE_FIELD = false;
|
||||
@NotNull public static final Boolean ANOTHER_ANNOTATED_FIELD = false;
|
||||
@NotNull public static final Boolean ANNOTATED_FIELD = false;
|
||||
private @NotNull Boolean annotatedField = false;
|
||||
public Boolean simpleField = false;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.example;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClassWithAnnotations {
|
||||
private static final Boolean SIMPLE_FIELD = false;
|
||||
|
||||
|
||||
@NotNull
|
||||
public static final Boolean ANOTHER_ANNOTATED_FIELD = false;
|
||||
|
||||
|
||||
@NotNull
|
||||
public static final Boolean ANNOTATED_FIELD = false;
|
||||
|
||||
|
||||
private @NotNull Boolean annotatedField = false;
|
||||
|
||||
public Boolean simpleField = false;
|
||||
}
|
||||
+8
@@ -26,4 +26,12 @@ class JavaFormatterBlankLinesAroundFieldTest : JavaFormatterTestCase() {
|
||||
getSettings(JavaLanguage.INSTANCE).BLANK_LINES_AROUND_FIELD = 1
|
||||
doTest()
|
||||
}
|
||||
|
||||
fun testRearrangement() {
|
||||
getSettings(JavaLanguage.INSTANCE).BLANK_LINES_AROUND_FIELD = 1
|
||||
val testName = getTestName(true)
|
||||
val afterFileName = "${testName}_after"
|
||||
doTest(testName, afterFileName)
|
||||
doTest(afterFileName, afterFileName)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user