Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfullbright2007-09-12 20:51:43 +0000
committerpfullbright2007-09-12 20:51:43 +0000
commitb40168262a0554e4aba14eda7d1acef99ece2a36 (patch)
tree76422b120186462315fabf75649e25ae46fc2cf1 /jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt
parente6b624669f7a3616105a8a08a669e05dd9dd37a4 (diff)
downloadwebtools.dali-b40168262a0554e4aba14eda7d1acef99ece2a36.tar.gz
webtools.dali-b40168262a0554e4aba14eda7d1acef99ece2a36.tar.xz
webtools.dali-b40168262a0554e4aba14eda7d1acef99ece2a36.zip
combined port of bug fixes for 192477, 202684, 202811, and 202959 - adding artifact edit functionality
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt')
-rw-r--r--jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/CollectionToolsTests.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/CollectionToolsTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/CollectionToolsTests.java
index 7bd0a7d3f8..4f1d9494af 100644
--- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/CollectionToolsTests.java
+++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/CollectionToolsTests.java
@@ -29,6 +29,7 @@ import org.eclipse.jpt.utility.internal.HashBag;
import org.eclipse.jpt.utility.internal.Range;
import org.eclipse.jpt.utility.internal.ReverseComparator;
import org.eclipse.jpt.utility.internal.iterators.ArrayIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
public class CollectionToolsTests extends TestCase {
@@ -1249,6 +1250,23 @@ public class CollectionToolsTests extends TestCase {
assertEquals(6, CollectionTools.insertionIndexOf(a, "A", c));
}
+ public void testIterableIterator() {
+ Iterator<Object> emptyIterator = EmptyIterator.instance();
+ Iterable<Object> emptyIterable = CollectionTools.iterable(emptyIterator);
+
+ assertEquals(emptyIterator, emptyIterable.iterator());
+
+ boolean exceptionThrown = false;
+ try {
+ emptyIterable.iterator();
+ }
+ catch (IllegalStateException ise) {
+ exceptionThrown = true;
+ }
+ assertTrue("IllegalStateException not thrown.", exceptionThrown);
+
+ }
+
public void testIterableObjectArray() {
String[] strings = this.buildStringArray1();
int i = 0;

Back to the top