Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-03-20 17:59:40 +0000
committerSergey Prigogin2011-03-20 17:59:40 +0000
commitd60f5b6c26c6615839b6785cdd19c2975b8341b0 (patch)
treeb1a6155d80c29596691d8d5e5c32d7e2f4363937 /core/org.eclipse.cdt.ui.tests
parent527ee4ff5aa6d5627c7079c2b7b5630ac9ec0845 (diff)
downloadorg.eclipse.cdt-d60f5b6c26c6615839b6785cdd19c2975b8341b0.tar.gz
org.eclipse.cdt-d60f5b6c26c6615839b6785cdd19c2975b8341b0.tar.xz
org.eclipse.cdt-d60f5b6c26c6615839b6785cdd19c2975b8341b0.zip
Formatting of binary expression partially produced by macro expansions.
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.java66
1 files changed, 53 insertions, 13 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 8cb7927df0a..d96b64338ba 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
@@ -2043,24 +2043,64 @@ public class CodeFormatterTest extends BaseUITestCase {
//#define B() { if (1+2) b(); }
//void g() {
- // if (1) {
- // B();
- // } else {
- // x();
- // }
- // z();
+ //if (1) {
+ //B();
+ //} else {
+ //x();
+ //}
+ //z();
//}
//#define B() { if (1+2) b(); }
//void g() {
- // if (1) {
- // B();
- // } else {
- // x();
- // }
- // z();
+ // if (1) {
+ // B();
+ // } else {
+ // x();
+ // }
+ // z();
+ //}
+ public void testBinaryExpressionInMacro_1() throws Exception {
+ fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
+ assertFormatterResult();
+ }
+
+ //class Stream {
+ //Stream& operator <<(const char* s);
+ //};
+ //
+ //class Voidifier {
+ //public:
+ //Voidifier();
+ //void operator &(Stream&);
+ //};
+ //
+ //Stream stream;
+ //#define STREAM Voidifier() & stream
+ //
+ //void test() {
+ //STREAM << "text text test text " << "text text " << "text text text text te";
+ //}
+
+ //class Stream {
+ // Stream& operator <<(const char* s);
+ //};
+ //
+ //class Voidifier {
+ //public:
+ // Voidifier();
+ // void operator &(Stream&);
+ //};
+ //
+ //Stream stream;
+ //#define STREAM Voidifier() & stream
+ //
+ //void test() {
+ // STREAM << "text text test text " << "text text "
+ // << "text text text text te";
//}
- public void testBinaryExpressionInMacro() throws Exception {
+ public void testBinaryExpressionInMacro_2() throws Exception {
+ fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
assertFormatterResult();
}

Back to the top