Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests/resources/formatter/sample/Before.cpp')
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/formatter/sample/Before.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/Before.cpp b/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/Before.cpp
new file mode 100644
index 00000000000..e1578fe118a
--- /dev/null
+++ b/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/Before.cpp
@@ -0,0 +1,55 @@
+#include <Simple.h>
+
+const SimpleStruct simpleStruct =
+{
+ 1
+ , "mySimple"
+ , 0.1232
+};
+
+#define SIZEOF( A, B ) sizeof( A.B )
+
+ #define FOREVER \
+ for(;;)\
+{\
+ \
+ }
+
+const OtherStruct array[] =
+{
+ {
+#if FOO
+ "foo"
+ # else
+ "bar"
+#endif
+ , SIZEOF( simpleStruct, num )
+ , &t_int
+ , 0
+ }
+ , {
+ "name"
+ , SIZEOF( simpleStruct, floatnum )
+ , &t_float
+ , 1
+ }
+};
+
+// single line outside scope
+
+void SimpleStruct_construct(
+struct SimpleStruct * const this )
+ {
+// single line
+this->num = 1;
+this->name = "boo";
+this->floatNum = 1.5;
+ }
+
+int ConnectParams_doSomething( const struct SimpleStruct * const this )
+ {
+/*
+ * multiline
+ */
+ return 1;
+ }

Back to the top