Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2008-04-04 08:11:04 +0000
committerAnton Leherbauer2008-04-04 08:11:04 +0000
commitfc2be4a64b56d589ea7fbf9118afec99639d7467 (patch)
tree9b590c0f161f7a8f4c02edbb21de1b3109ba1d4d /core/org.eclipse.cdt.ui.tests
parent97170d3d09f60496ef3002490601cbc533e17402 (diff)
downloadorg.eclipse.cdt-fc2be4a64b56d589ea7fbf9118afec99639d7467.tar.gz
org.eclipse.cdt-fc2be4a64b56d589ea7fbf9118afec99639d7467.tar.xz
org.eclipse.cdt-fc2be4a64b56d589ea7fbf9118afec99639d7467.zip
Fix for 225326: Code formatter strips whitespace when it shouldn't
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.java40
1 files changed, 40 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 4335d6d62e3..0f3c3bce9b8 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
@@ -561,4 +561,44 @@ public class CodeFormatterTest extends BaseUITestCase {
assertFormatterResult();
}
+ //NOT_DEFINED void foo()
+ // {
+ // }
+ //
+ //enum T1
+ // {
+ // E1 = 1
+ // };
+
+ //NOT_DEFINED void foo() {
+ //}
+ //
+ //enum T1 {
+ // E1 = 1
+ //};
+ public void testPreserveWhitespace_Bug225326() throws Exception {
+ assertFormatterResult();
+ }
+
+ //NOT_DEFINED void foo()
+ // {
+ // }
+ //
+ //enum T1
+ // {
+ // E1 = 1
+ // };
+
+ //NOT_DEFINED void foo()
+ // {
+ // }
+ //
+ //enum T1
+ // {
+ // E1 = 1
+ // };
+ public void testPreserveWhitespace2_Bug225326() throws Exception {
+ fOptions= DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap();
+ assertFormatterResult();
+ }
}

Back to the top