Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-04-23 19:23:59 -0400
committerSergey Prigogin2011-04-23 19:23:59 -0400
commit21f63f9233b9f5fbc6b6b6a1b81c5ea16ed1bb2f (patch)
treed4913c34bc9c707910fce1b9d012ac803feaadda /core/org.eclipse.cdt.ui.tests
parent850a56e5d78e4f39963b0408233892d78aa6d8cc (diff)
downloadorg.eclipse.cdt-21f63f9233b9f5fbc6b6b6a1b81c5ea16ed1bb2f.tar.gz
org.eclipse.cdt-21f63f9233b9f5fbc6b6b6a1b81c5ea16ed1bb2f.tar.xz
org.eclipse.cdt-21f63f9233b9f5fbc6b6b6a1b81c5ea16ed1bb2f.zip
Bug fixes in formatting of function-style macros.
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests')
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java
index a7580b124a..e148df8507 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java
@@ -1360,6 +1360,27 @@ public class CodeFormatterTest extends BaseUITestCase {
assertFormatterResult();
}
+ //#define MY_MACRO(x, b) switch (0) default: if (false)
+ //
+ //void func() {
+ //MY_MACRO(1000000 + 2000000 + 3000000 + 4000000 + 5000000, 6000000 + 700000);
+ //MY_MACRO(1000000 + 2000000 + 3000000 + 4000000 + 5000000, 6000000 + 7000000);
+ //}
+
+ //#define MY_MACRO(x, b) switch (0) default: if (false)
+ //
+ //void func() {
+ // MY_MACRO(1000000 + 2000000 + 3000000 + 4000000 + 5000000, 6000000 + 700000);
+ // MY_MACRO(1000000 + 2000000 + 3000000 + 4000000 + 5000000,
+ // 6000000 + 7000000);
+ //}
+ public void testFunctionStyleMacro_3() throws Exception {
+ fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
+ fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION,
+ Integer.toString(Alignment.M_NEXT_PER_LINE_SPLIT | Alignment.M_INDENT_ON_COLUMN));
+ assertFormatterResult();
+ }
+
//void foo() {
//for(int i=0;i<50;++i){}
//}

Back to the top