[Java. Code Formatting] Disable KEEP_LINE_BREAKS by default in TypeAnnotationFormatterTest

IDEA-353192

GitOrigin-RevId: cdefb444214d19fcfa762e2ab00fb0e236882d14
This commit is contained in:
Georgii Ustinov
2024-06-19 17:33:46 +03:00
committed by intellij-monorepo-bot
parent 1b99ec9f45
commit 009e515c58
6 changed files with 12 additions and 27 deletions

View File

@@ -9,13 +9,11 @@ public class Formatter {
return null;
}
@org.jetbrains.annotations.NotNull
String getNotNullName() {
@org.jetbrains.annotations.NotNull String getNotNullName() {
return "";
}
@org.jetbrains.annotations.Nullable
String getNullableName() {
@org.jetbrains.annotations.Nullable String getNullableName() {
return null;
}
}

View File

@@ -9,8 +9,7 @@ public class Formatter {
return List.of();
}
@NotNull @org.jetbrains.annotations.Nullable
String getNotNullName() {
@NotNull @org.jetbrains.annotations.Nullable String getNotNullName() {
return "";
}
}

View File

@@ -13,13 +13,11 @@ public class Formatter {
return null;
}
@NotNull
String getNotNullName() {
@NotNull String getNotNullName() {
return "";
}
@Nullable
String getNullableName() {
@Nullable String getNullableName() {
return null;
}
}

View File

@@ -6,14 +6,11 @@ import org.jetbrains.annotations.Nullable;
import java.util.List;
public class Formatter {
@NotNull
@Nullable <T, V> List<T> getStrangeList() {
@NotNull @Nullable <T, V> List<T> getStrangeList() {
return List.of();
}
@NotNull
@Nullable
String getNotNullName() {
@NotNull @Nullable String getNotNullName() {
return "";
}
}

View File

@@ -14,13 +14,11 @@ public class Formatter {
return null;
}
@NotNull
String getNotNullName() {
@NotNull String getNotNullName() {
return "";
}
@Nullable
String getNullableName() {
@Nullable String getNullableName() {
return null;
}
}

View File

@@ -20,6 +20,7 @@ class TypeAnnotationFormatterTest : LightJavaCodeInsightFixtureTestCase() {
override fun setUp() {
super.setUp()
commonSettings.KEEP_LINE_BREAKS = false
commonSettings.METHOD_ANNOTATION_WRAP = WRAP_ALWAYS
ModuleRootModificationUtil.updateModel(module, DefaultLightProjectDescriptor::addJetBrainsAnnotations)
}
@@ -42,15 +43,9 @@ class TypeAnnotationFormatterTest : LightJavaCodeInsightFixtureTestCase() {
fun testImportMix() = doTest()
fun testSpacesInImportList() {
commonSettings.KEEP_LINE_BREAKS = false
doTest()
}
fun testSpacesInImportList() = doTest()
fun testSpacesInFqnAnnotations() {
commonSettings.KEEP_LINE_BREAKS = false
doTest()
}
fun testSpacesInFqnAnnotations() = doTest()
private fun doTest() {
val testName = getTestName(false)