Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2006-12-04 11:17:24 -0500
committerAnton Leherbauer2006-12-04 11:17:24 -0500
commitb9391d98b150d460ee65c905bcc28c7d3d5af56b (patch)
tree97d4f17d6da085a0ae22e3cea8423f1459d2fdaa /core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.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/preview/Before.cpp')
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp b/core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp
new file mode 100644
index 00000000000..a48488347f2
--- /dev/null
+++ b/core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp
@@ -0,0 +1,5 @@
+/*
+ * Indentation
+ */
+#include <math.h>
+class Point {public:Point(double xc, double yc) : x(xc), y(yc) {}double distance(const Point& other) const;int compareX(const Point& other) const;double x;double y;};double Point::distance(const Point& other) const {double dx = x - other.x;double dy = y - other.y;return sqrt(dx * dx + dy * dy);}int Point::compareX(const Point& other) const {if (x < other.x) {return -1;} else if (x > other.x) {return 1;} else {return 0;}}namespace FOO {int foo(int bar) const {switch (bar) {case 0:++bar;break;case 1:--bar;default: {bar += bar;break;}}}} // end namespace FOO

Back to the top