Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 52365 Details for
Bug 160337
Empty block not detected inside anonymous class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression tests
patch_160337_tests.txt (text/plain), 3.04 KB, created by
Olivier Thomann
on 2006-10-19 22:06:55 EDT
(
hide
)
Description:
Regression tests
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-10-19 22:06:55 EDT
Size:
3.04 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java,v >retrieving revision 1.18 >diff -u -r1.18 ParserTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java 5 Sep 2006 18:35:08 -0000 1.18 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java 20 Oct 2006 02:10:22 -0000 >@@ -623,4 +623,83 @@ > options // custom options > ); > } >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=160337 >+ */ >+public void test025() { >+ Map options = getCompilerOptions(); >+ options.put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, CompilerOptions.ERROR); >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " static class Y {\n" + >+ " public void foo(int i) {}\n" + >+ " }\n" + >+ " static Y FakeInvocationSite = new Y(){\n" + >+ " public void foo(int i) {}\n" + >+ " };\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 3)\n" + >+ " public void foo(int i) {}\n" + >+ " ^^\n" + >+ "Empty block should be documented\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 6)\n" + >+ " public void foo(int i) {}\n" + >+ " ^^\n" + >+ "Empty block should be documented\n" + >+ "----------\n", >+ null, // custom classpath >+ true, // flush previous output dir content >+ options // custom options >+ ); >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=160337 >+ */ >+public void test026() { >+ Map options = getCompilerOptions(); >+ options.put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, CompilerOptions.ERROR); >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " static class Y {\n" + >+ " public void foo(int i) {}\n" + >+ " }\n" + >+ " static Y FakeInvocationSite = new Y(){\n" + >+ " public void foo(int i) {\n" + >+ " class A {\n" + >+ " A() {}\n" + >+ " public void bar() {}\n" + >+ " }\n" + >+ " new A().bar();\n" + >+ " }\n" + >+ " };\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 3)\n" + >+ " public void foo(int i) {}\n" + >+ " ^^\n" + >+ "Empty block should be documented\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 8)\n" + >+ " A() {}\n" + >+ " ^^\n" + >+ "Empty block should be documented\n" + >+ "----------\n" + >+ "3. ERROR in X.java (at line 9)\n" + >+ " public void bar() {}\n" + >+ " ^^\n" + >+ "Empty block should be documented\n" + >+ "----------\n", >+ null, // custom classpath >+ true, // flush previous output dir content >+ options // custom options >+ ); >+} > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 160337
:
52364
| 52365