diff options
| author | Manoj Palat | 2015-04-07 12:04:55 +0000 |
|---|---|---|
| committer | Manoj Palat | 2015-04-07 12:04:55 +0000 |
| commit | 959aac6fcb83b61039c3ddae468ad5563b6ccb62 (patch) | |
| tree | b4d390e2dfec5a7b3b6564e88004d0b9664779f7 | |
| parent | 290693fab6c14fd3b3082c184001228213a11167 (diff) | |
| download | eclipse.jdt.core-959aac6fcb83b61039c3ddae468ad5563b6ccb62.tar.gz eclipse.jdt.core-959aac6fcb83b61039c3ddae468ad5563b6ccb62.tar.xz eclipse.jdt.core-959aac6fcb83b61039c3ddae468ad5563b6ccb62.zip | |
Test case for Bug 434821 [formatter] Comment at end of line messes withI20150408-1100
indentation
| -rw-r--r-- | org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugs18Tests.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugs18Tests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugs18Tests.java index 42e10d52aa..f9dcb0ac74 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugs18Tests.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugs18Tests.java @@ -204,5 +204,37 @@ public void testBug433177() throws Exception { formatSource(source,expected); } +public void testBug434821() throws Exception { + String source ="public class FormatterTest {\n"+ + " public void doNothing() {\n"+ + " new Thread(() -> {\n"+ + " synchronized (this) {\n"+ + " try {\n"+ + " Thread.sleep(0); // blah\n"+ + " } catch (final InterruptedException e2) {\n"+ + " e2.printStackTrace();\n"+ + " }\n"+ + " }\n"+ + "\n"+ + " } ).start();\n"+ + " }\n"+ + "}\n"; + String expected = "public class FormatterTest {\n"+ + " public void doNothing() {\n"+ + " new Thread(() -> {\n"+ + " synchronized (this) {\n"+ + " try {\n"+ + " Thread.sleep(0); // blah\n"+ + " } catch (final InterruptedException e2) {\n"+ + " e2.printStackTrace();\n"+ + " }\n"+ + " }\n"+ + "\n"+ + " } ).start();\n"+ + " }\n"+ + "}\n"; + + formatSource(source,expected); +} }
\ No newline at end of file |
