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 75101 Details for
Bug 198483
BuilderTests: need expectingUniqueCompiledClasses method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch to test code
uniqueclasses.txt (text/plain), 1.69 KB, created by
Walter Harley
on 2007-08-01 02:58:30 EDT
(
hide
)
Description:
Proposed patch to test code
Filename:
MIME Type:
Creator:
Walter Harley
Created:
2007-08-01 02:58:30 EDT
Size:
1.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.builder >Index: src/org/eclipse/jdt/core/tests/builder/BuilderTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BuilderTests.java,v >retrieving revision 1.12 >diff -u -r1.12 BuilderTests.java >--- src/org/eclipse/jdt/core/tests/builder/BuilderTests.java 14 Mar 2007 13:58:37 -0000 1.12 >+++ src/org/eclipse/jdt/core/tests/builder/BuilderTests.java 1 Aug 2007 06:56:28 -0000 >@@ -151,6 +151,31 @@ > org.eclipse.jdt.internal.core.util.Util.sort(expected); > expectingCompiling(actual, expected, "unexpected recompiled units"); //$NON-NLS-1$ > } >+ >+ /** >+ * Verifies that the given classes and no others have been compiled, >+ * but permits the classes to have been compiled more than once. >+ */ >+ protected void expectingUniqueCompiledClasses(String[] expected) { >+ String[] actual = debugRequestor.getCompiledClasses(); >+ org.eclipse.jdt.internal.core.util.Util.sort(actual); >+ // Eliminate duplicate entries >+ int dups = 0; >+ for (int i = 0; i < actual.length - 1; ++i) { >+ if (actual[i + 1].equals(actual[i])) { >+ ++dups; >+ actual[i] = null; >+ } >+ } >+ String[] uniqueActual = new String[actual.length - dups]; >+ for (int i = 0, j = 0; i < actual.length; ++i) { >+ if (actual[i] != null) { >+ uniqueActual[j++] = actual[i]; >+ } >+ } >+ org.eclipse.jdt.internal.core.util.Util.sort(expected); >+ expectingCompiling(uniqueActual, expected, "unexpected compiled units"); //$NON-NLS-1$ >+ } > > /** Verifies that given classes have been compiled in the specified order. > */
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 198483
: 75101