Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-03-03 21:04:11 -0500
committerSergey Prigogin2011-03-03 21:04:11 -0500
commitda8a1d0b28cd6be12d2b771ef40861b1bd0ade19 (patch)
tree0b1d956c362050a0b8ecdc9a3764fc6e8e8ed947 /core/org.eclipse.cdt.ui.tests
parented9db92e4071dd8ce1a4a63ceb9865492d27a035 (diff)
downloadorg.eclipse.cdt-da8a1d0b28cd6be12d2b771ef40861b1bd0ade19.tar.gz
org.eclipse.cdt-da8a1d0b28cd6be12d2b771ef40861b1bd0ade19.tar.xz
org.eclipse.cdt-da8a1d0b28cd6be12d2b771ef40861b1bd0ade19.zip
Bug fixes.
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.java48
1 files changed, 48 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 493acbae9e..550f87a8d2 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
@@ -991,6 +991,27 @@ public class CodeFormatterTest extends BaseUITestCase {
assertFormatterResult();
}
+ //#define ABSTRACT = 0
+ //
+ //class A {
+ // virtual bool function_with_a_loooooong_name(const char* parameter) ABSTRACT;
+ // virtual bool function_with_a_looooooong_name(const char* parameter) ABSTRACT;
+ //};
+
+ //#define ABSTRACT = 0
+ //
+ //class A {
+ // virtual bool function_with_a_loooooong_name(const char* parameter) ABSTRACT;
+ // virtual bool function_with_a_looooooong_name(const char* parameter)
+ // ABSTRACT;
+ //};
+ public void testFunctionDeclarationTrailingMacro() throws Exception {
+ fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
+ fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION,
+ Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
+ assertFormatterResult();
+ }
+
//void f1(const char* long_parameter_name,int very_looooooooong_parameter_name){}
//void f2(const char* long_parameter_name,int very_loooooooooong_parameter_name){}
@@ -1065,6 +1086,33 @@ public class CodeFormatterTest extends BaseUITestCase {
assertFormatterResult();
}
+ //#define STREAM GetStream()
+ //class Stream {
+ //Stream& operator <<(const char*);
+ //};
+ //Stream GetStream();
+ //
+ //void test() {
+ // // comment
+ //STREAM << "text " << "text " << "text " << "text " << "text " << "text " << "text " << "text ";
+ //}
+
+ //#define STREAM GetStream()
+ //class Stream {
+ // Stream& operator <<(const char*);
+ //};
+ //Stream GetStream();
+ //
+ //void test() {
+ // // comment
+ // STREAM << "text " << "text " << "text " << "text " << "text " << "text "
+ // << "text " << "text ";
+ //}
+ public void testMacroAfterComment() throws Exception {
+ fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
+ assertFormatterResult();
+ }
+
//#define MY_MACRO(a, b, c)
//
//MY_MACRO(abcdefghijklmnopqrstuvwxyz,25,"very very very very very very very very very very long text");

Back to the top