mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
tests for aligning binary and ternary expressions in groovy (IDEA-74585,IDEA-74586)
This commit is contained in:
@@ -156,6 +156,16 @@ public class FormatterTest extends GroovyFormatterTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAlignBinaries() throws Throwable {
|
||||
myTempSettings.ALIGN_MULTILINE_BINARY_OPERATION = true;
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAlignTernaries() throws Throwable {
|
||||
myTempSettings.ALIGN_MULTILINE_TERNARY_OPERATION = true;
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void doTest() {
|
||||
final List<String> data = TestUtils.readInput(getTestDataPath() + getTestName(true) + ".test");
|
||||
checkFormatting(data.get(0), StringUtil.trimEnd(data.get(1), "\n"));
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
def foo = 2 +
|
||||
2
|
||||
-----
|
||||
def foo = 2 +
|
||||
2
|
||||
@@ -0,0 +1,5 @@
|
||||
def foo = true ? 2 :
|
||||
2
|
||||
-----
|
||||
def foo = true ? 2 :
|
||||
2
|
||||
Reference in New Issue
Block a user