Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2006-12-04 16:17:24 +0000
committerAnton Leherbauer2006-12-04 16:17:24 +0000
commitb9391d98b150d460ee65c905bcc28c7d3d5af56b (patch)
tree97d4f17d6da085a0ae22e3cea8423f1459d2fdaa /core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp
parentb9f960d0c81ecff9c5702a0547b9260d1e739832 (diff)
downloadorg.eclipse.cdt-b9391d98b150d460ee65c905bcc28c7d3d5af56b.tar.gz
org.eclipse.cdt-b9391d98b150d460ee65c905bcc28c7d3d5af56b.tar.xz
org.eclipse.cdt-b9391d98b150d460ee65c905bcc28c7d3d5af56b.zip
Create formatter junit tests
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp')
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp b/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp
new file mode 100644
index 00000000000..4fac3784e72
--- /dev/null
+++ b/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.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