test #dup

git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4048 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
Minero Aoki 2008-09-23 13:45:26 +00:00
parent 9fcae829f5
commit 293a917057
1 changed files with 11 additions and 0 deletions

View File

@ -50,4 +50,15 @@ public class TestClonableIterator {
assertEquals("[1,2].next", 1, it.next());
assertEquals("[2].next", 2, it.next());
}
@Test public void dup() {
List<Integer> list = new ArrayList<Integer>();
list.add(1);
list.add(2);
ClonableIterator it = new ClonableIterator(list);
it.next();
ClonableIterator it2 = it.dup();
assertEquals("dup+hasNext #1", true, it2.hasNext());
assertEquals("dup+next #1", 2, it2.next());
}
}