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 42059 Details for
Bug 142793
NPE in core.dom.ASTConverter.createFakeEmptyStatement results in java.lang.OutOfMemory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch_142793_tests.txt (text/plain), 2.31 KB, created by
Olivier Thomann
on 2006-05-19 14:22:46 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-05-19 14:22:46 EDT
Size:
2.31 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java,v >retrieving revision 1.199 >diff -u -r1.199 ASTConverter15Test.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 10 May 2006 14:21:54 -0000 1.199 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 19 May 2006 18:25:32 -0000 >@@ -46,7 +46,7 @@ > } > > static { >-// TESTS_NUMBERS = new int[] { 218 }; >+// TESTS_NUMBERS = new int[] { 220 }; > // TESTS_NAMES = new String[] {"test0204"}; > } > public static Test suite() { >@@ -6910,4 +6910,36 @@ > IAnnotationBinding annotationBinding = annotation.resolveAnnotationBinding(); > assertNull("Got a binding", annotationBinding); > } >+ >+ /* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=142793 >+ */ >+ public void test0220() throws JavaModelException { >+ this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); >+ String contents = >+ "public class X {\n" + >+ " void bar(String[] c) {\n" + >+ " for(String s: c) {\n" + >+ " try {\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}"; >+ ASTNode node = buildAST( >+ contents, >+ this.workingCopy, >+ false, >+ true); >+ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); >+ CompilationUnit unit = (CompilationUnit) node; >+ assertProblemsSize(unit, 1, "Syntax error, insert \"Finally\" to complete BlockStatements"); >+ node = getASTNode(unit, 0, 0, 0); >+ assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, node.getNodeType()); >+ EnhancedForStatement statement = (EnhancedForStatement) node; >+ Statement statement2 = statement.getBody(); >+ assertEquals("Not an empty statement", ASTNode.EMPTY_STATEMENT, statement2.getNodeType()); >+ assertEquals("Wrong length", 0, statement2.getLength()); >+ assertTrue("Not recovered", isRecovered(statement2)); >+ assertTrue("Not malformed", isMalformed(statement2)); >+ } > } >\ No newline at end of file
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 142793
:
42031
|
42040
|
42057
| 42059 |
42294