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 15835 Details for
Bug 78275
[recovery] NPE in GoToNextPreviousMemberAction with syntax error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test add to CompilationUnitTests
v00-model.txt (text/plain), 2.08 KB, created by
Frederic Fusier
on 2004-11-12 15:26:22 EST
(
hide
)
Description:
Regression test add to CompilationUnitTests
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2004-11-12 15:26:22 EST
Size:
2.08 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java,v >retrieving revision 1.23 >diff -u -r1.23 CompilationUnitTests.java >--- src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java 4 Nov 2004 10:18:35 -0000 1.23 >+++ src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java 12 Nov 2004 20:08:15 -0000 >@@ -66,11 +66,9 @@ > // Use this static initializer to specify subset for tests > // All specified tests which do not belong to the class are skipped... > static { >- // Names of tests to run: can be "testBugXXXX" or "BugXXXX") >-// TESTS_NAMES = new String[] { "Bug73884" }; >- // Numbers of tests to run: "test<number>" will be run for each number of this array >+// TESTS_PREFIX = "testBug"; >+// TESTS_NAMES = new String[] { "Bug78275" }; > // TESTS_NUMBERS = new int[] { 13 }; >- // Range numbers of tests to run: all tests between "test<first>" and "test<last>" will be run for { first, last } > // TESTS_RANGE = new int[] { 16, -1 }; > } > public static Test suite() { >@@ -626,5 +624,28 @@ > workingCopy.getBuffer().setContents(source); > workingCopy.makeConsistent(null); > return workingCopy; >+} >+ >+/* >+ * Verify fix for bug 78275: [recovery] NPE in GoToNextPreviousMemberAction with syntax error >+ * (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=78275) >+ */ >+public void testBug78275() throws CoreException { >+ try { >+ String cuSource = >+ "public class X {\n" + >+ " void a() {\n" + >+ " }\n" + >+ " }\n" + >+ " void m() {}\n" + >+ "}\n"; >+ createFile("/P/src/X.java", cuSource); >+ IType type = getCompilationUnit("/P/src/X.java").getType("X"); >+ IInitializer[] initializers = type.getInitializers(); >+ assertEquals("Invalid number of initializers", 1, initializers.length); >+ assertTrue("Invalid length for initializer", initializers[0].getSourceRange().getLength() > 0); >+ } finally { >+ deleteFile("/P/src/X.java"); >+ } > } > }
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 78275
:
15834
| 15835 |
16009