Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Montojo2007-11-01 11:06:36 -0400
committerJason Montojo2007-11-01 11:06:36 -0400
commit5e13f37831816a71dacd85ea880b470554571088 (patch)
treef02127a62c6e15ca5f4da7efffba0ea1f3340bd4
parent8b8971f1a3fae2ae08a8bdb9186d956014c89e97 (diff)
downloadorg.eclipse.cdt-5e13f37831816a71dacd85ea880b470554571088.tar.gz
org.eclipse.cdt-5e13f37831816a71dacd85ea880b470554571088.tar.xz
org.eclipse.cdt-5e13f37831816a71dacd85ea880b470554571088.zip
Fix for bug 208418
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java
index 96c11bbc2c5..9febc3e7ced 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java
@@ -8,9 +8,13 @@
* Contributors:
* QNX Software Systems - Initial API and implementation
* Markus Schorn (Wind River Systems)
+ * IBM Corporation
*******************************************************************************/
package org.eclipse.cdt.core.model.tests;
+import java.util.HashSet;
+import java.util.Set;
+
import junit.framework.TestSuite;
import org.eclipse.cdt.core.dom.IPDOMManager;
@@ -277,9 +281,14 @@ public class CPathEntryTest extends BaseTestCase {
assertEquals(sourceEntryName, entries[0].getName());
IPath[] actualExclusionPatterns = entries[0].getExclusionPatterns();
assertEquals(exclusionPatterns.length, actualExclusionPatterns.length);
- for (int i = 0; i < actualExclusionPatterns.length; i++) {
- IPath path = actualExclusionPatterns[i];
- assertEquals(exclusionPatterns[i], actualExclusionPatterns[i]);
+ assertEquals(toSet(exclusionPatterns), toSet(actualExclusionPatterns));
+ }
+
+ private Set toSet(Object[] array) {
+ HashSet set = new HashSet();
+ for (int i = 0; i < array.length; i++) {
+ set.add(array[i]);
}
+ return set;
}
}

Back to the top