1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: InterfaceContainer_Test.java,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 package com
.sun
.star
.lib
.uno
.helper
;
33 import com
.sun
.star
.uno
.XInterface
;
34 import java
.util
.Iterator
;
35 import java
.util
.ListIterator
;
36 import com
.sun
.star
.uno
.Type
;
37 import com
.sun
.star
.uno
.XWeak
;
38 import com
.sun
.star
.lang
.XTypeProvider
;
39 import com
.sun
.star
.lang
.XEventListener
;
40 import java
.util
.ArrayList
;
41 import com
.sun
.star
.lang
.XMultiComponentFactory
;
42 import com
.sun
.star
.uno
.XComponentContext
;
43 import com
.sun
.star
.comp
.helper
.Bootstrap
;
44 import com
.sun
.star
.bridge
.XUnoUrlResolver
;
45 import com
.sun
.star
.uno
.UnoRuntime
;
46 import com
.sun
.star
.lang
.XMultiServiceFactory
;
47 import com
.sun
.star
.lang
.XSingleServiceFactory
;
48 import com
.sun
.star
.uno
.IQueryInterface
;
49 //import com.sun.star.lib.uno.environments.java.IRequester;
50 import com
.sun
.star
.bridge
.XBridge
;
51 //import com.sun.star.lib.uno.environments.java.Proxy;
52 import com
.sun
.star
.lib
.uno
.environments
.java
.java_environment
;
53 import com
.sun
.star
.lib
.uno
.typedesc
.TypeDescription
;
54 import java
.util
.HashMap
;
55 import java
.util
.List
;
56 import java
.util
.NoSuchElementException
;
58 public class InterfaceContainer_Test
60 java_environment env
= new java_environment(null);
61 /** Creates a new instance of InterfaceContainerTest */
62 AWeakBase obj1
,obj2
,obj3
,obj4
;
63 Object proxyObj1Weak1
;
64 Object proxyObj3Weak1
;
65 Object proxyObj3Weak2
;
66 Object proxyObj3TypeProv
;
67 Object proxyObj2TypeProv
;
68 //contains original objects
70 //contains original objects + proxies
72 //contains original object + proxies + null value
75 public InterfaceContainer_Test()
77 obj1
= new AWeakBase();
78 obj2
= new AWeakBase();
79 obj3
= new AWeakBase();
80 obj4
= new AWeakBase();
81 proxyObj1Weak1
= ProxyProvider
.createProxy(obj1
, XWeak
.class);
82 proxyObj3Weak1
= ProxyProvider
.createProxy(obj3
, XWeak
.class);
83 proxyObj3Weak2
= ProxyProvider
.createProxy(obj3
, XWeak
.class);
84 proxyObj2TypeProv
= ProxyProvider
.createProxy(obj2
, XTypeProvider
.class);
85 proxyObj3TypeProv
= ProxyProvider
.createProxy(obj3
, XTypeProvider
.class);
87 list1
= new ArrayList();
91 list2
= new ArrayList();
93 list2
.add(proxyObj2TypeProv
);
94 list2
.add(proxyObj3TypeProv
);
95 list3
= new ArrayList();
98 list3
.add(proxyObj2TypeProv
);
99 list3
.add(proxyObj3Weak1
);
102 /** Tests add(object), size(), clear();
106 System
.out
.println("Testing List.add(Object), List.size(), List.clear(), List.isEmpty()");
107 InterfaceContainer cont
= new InterfaceContainer();
108 boolean r
[]= new boolean[50];
111 r
[i
++]= cont
.size() == 0;
112 r
[i
++]= cont
.add(obj1
);
113 r
[i
++]= cont
.size() == 1;
114 r
[i
++]= cont
.add(obj1
); // add the same object again
115 r
[i
++]= cont
.size() == 2;
116 r
[i
++]= cont
.add(proxyObj3TypeProv
);
117 r
[i
++]= cont
.size() == 3;
118 r
[i
++]= cont
.isEmpty() ?
false: true;
120 r
[i
++]= cont
.size() == 0;
121 r
[i
++]= cont
.isEmpty();
124 for (int c
= 0; c
< i
; c
++)
127 System
.out
.println("Failed");
129 System
.out
.println("Ok");
133 /**Tests list.addAll(Collection c), list.addAll(int index, Collection c)
135 public boolean listConstructors()
137 System
.out
.println("Testing Constructors of InterfaceContainer");
138 boolean r
[]= new boolean[50];
140 InterfaceContainer cont
= new InterfaceContainer(100);
142 r
[i
++]= cont
.elementData
.length
== 100;
144 for (int c
= 0; c
< i
; c
++)
147 System
.out
.println("Failed");
149 System
.out
.println("Ok");
152 public boolean trimToSize()
154 System
.out
.println("Testing InterfaceContainer.trimToSize");
155 InterfaceContainer cont
= new InterfaceContainer(100);
156 boolean r
[]= new boolean[50];
159 r
[i
++]= cont
.isEmpty();
160 cont
= new InterfaceContainer(10);
163 r
[i
++]= cont
.elementData
.length
== list1
.size();
165 for (int c
= 0; c
< i
; c
++)
168 System
.out
.println("Failed");
170 System
.out
.println("Ok");
173 public boolean ensureCapacity()
175 System
.out
.println("Testing InterfaceContainer.ensureCapacity");
176 InterfaceContainer cont
= new InterfaceContainer(10);
177 boolean r
[]= new boolean[50];
180 cont
.ensureCapacity(9);
181 r
[i
++]= cont
.elementData
.length
>= 9;
182 cont
.ensureCapacity(11);
183 r
[i
++]= cont
.elementData
.length
>= 11;
185 for (int c
= 0; c
< i
; c
++)
188 System
.out
.println("Failed");
190 System
.out
.println("Ok");
194 public boolean addAll()
196 System
.out
.println("Testing List.addAll(Collection c), List.addAll(int index, Collection c)");
197 InterfaceContainer cont
= new InterfaceContainer();
198 boolean r
[]= new boolean[50];
201 r
[i
++]= cont
.addAll(list1
);
202 r
[i
++]= cont
.size() == list1
.size();
203 for (int c
= 0; c
< cont
.size(); c
++)
205 r
[i
++]= list1
.get(c
) == cont
.get(c
);
208 r
[i
++]= cont
.addAll(1, list2
);
209 r
[i
++]= cont
.get(0) == list1
.get(0);
210 r
[i
++]= cont
.get(1) == list2
.get(0);
211 r
[i
++]= cont
.get(2) == list2
.get(1);
212 r
[i
++]= cont
.get(3) == list2
.get(2);
213 r
[i
++]= cont
.get(4) == list1
.get(1);
214 r
[i
++]= cont
.get(5) == list1
.get(2);
215 r
[i
++]= cont
.get(6) == obj1
;
218 // the null element in list3 at index 1 is not added to cont
219 r
[i
++]= cont
.get(0) == list3
.get(0);
220 r
[i
++]= cont
.get(1) == list3
.get(2);
221 r
[i
++]= cont
.get(2) == list3
.get(3);
224 for (int c
= 0; c
< i
; c
++)
227 System
.out
.println("Failed");
229 System
.out
.println("Ok");
233 /** Tests List.add(int index, Object element), List.get(int index)
237 System
.out
.println("Testing List.add(int index, Object element), List.get(int index)");
238 InterfaceContainer cont
= new InterfaceContainer();
239 boolean r
[]= new boolean[50];
244 cont
.add(1, proxyObj3Weak1
);
246 r
[i
++]= cont
.get(0) == obj1
;
247 r
[i
++]= cont
.get(1) == proxyObj3Weak1
;
248 r
[i
++]= cont
.get(2) == obj2
;
249 r
[i
++]= cont
.get(3) == obj3
;
253 }catch( java
.lang
.Exception e
)
259 for (int c
= 0; c
< i
; c
++)
262 System
.out
.println("Failed");
264 System
.out
.println("Ok");
267 /** Tests List.contains
269 public boolean contains()
271 System
.out
.println("Testing List.contains()");
272 InterfaceContainer cont
= new InterfaceContainer();
273 boolean r
[]= new boolean[50];
276 r
[i
++]= cont
.contains(obj1
) ?
false : true; // nothing in the list
278 cont
.add(proxyObj2TypeProv
);
279 cont
.add(proxyObj3TypeProv
);
280 r
[i
++]= cont
.contains(obj1
);
281 r
[i
++]= cont
.contains(obj2
);
282 r
[i
++]= cont
.contains(proxyObj3Weak1
);
283 r
[i
++]= cont
.contains(proxyObj3Weak2
);
284 r
[i
++]= cont
.contains(proxyObj1Weak1
);
285 r
[i
++]= cont
.contains(obj3
);
286 r
[i
++]= cont
.contains(null) ?
false : true;
289 for (int c
= 0; c
< i
; c
++)
292 System
.out
.println("Failed");
294 System
.out
.println("Ok");
297 /** Tests List.containsAll
299 public boolean containsAll()
301 System
.out
.println("Testing List.containsAll");
302 InterfaceContainer cont
= new InterfaceContainer();
303 boolean r
[]= new boolean[50];
306 r
[i
++]= cont
.containsAll(list1
);
309 r
[i
++]= cont
.containsAll(list2
);
311 cont
.addAll(list3
); // the null element in list3 is not added to cont
312 r
[i
++]= cont
.containsAll(list3
) ?
false : true;
314 for( int x
= 0; x
< 6; x
++)
316 r
[i
++]= cont
.contains(list1
) ?
false : true;
317 cont
.add(1, list1
.get(0));
318 cont
.add(3, list1
.get(1));
319 cont
.add(5, list1
.get(2));
320 r
[i
++]= cont
.contains(list1
) ?
false : true;
323 for (int c
= 0; c
< i
; c
++)
326 System
.out
.println("Failed");
328 System
.out
.println("Ok");
331 /** Tests List.indexOf, List.lastIndexOf
333 public boolean indexOf()
335 System
.out
.println("Testing List.indexOf(Object element), List.lastIndexOf(Object element)");
336 InterfaceContainer cont
= new InterfaceContainer();
337 boolean r
[]= new boolean[50];
341 r
[i
++]= cont
.indexOf(obj3
) == 2;
342 r
[i
++]= cont
.lastIndexOf(obj3
) == 5;
346 r
[i
++]= cont
.indexOf(proxyObj3Weak1
) == 2;
347 r
[i
++]= cont
.lastIndexOf(proxyObj3Weak2
) == 5;
350 for (int c
= 0; c
< i
; c
++)
353 System
.out
.println("Failed");
355 System
.out
.println("Ok");
359 /** Tests List.remove(int index), List.remove(Object element), List.removeAll(Collection c)
361 public boolean remove()
363 System
.out
.println("Testing List.remove(int index), List.remove(Object element), List.removeAll(Collection c)");
364 InterfaceContainer cont
= new InterfaceContainer();
365 boolean r
[]= new boolean[50];
369 r
[i
++]= proxyObj2TypeProv
.equals(cont
.remove(1));
370 r
[i
++]= cont
.size() == 2;
373 r
[i
++]= cont
.remove(obj1
);
374 r
[i
++]= cont
.remove(proxyObj2TypeProv
);
375 r
[i
++]= cont
.remove(proxyObj3Weak2
);
376 r
[i
++]= cont
.isEmpty();
379 r
[i
++]= cont
.removeAll(list3
);
380 r
[i
++]= cont
.isEmpty();
383 List list
= new ArrayList();
384 list
.add(list2
.get(0));
385 list
.add(list2
.get(1));
386 list
.add(proxyObj3Weak2
);
387 r
[i
++]= cont
.removeAll(list
);
388 r
[i
++]= cont
.isEmpty();
391 for (int c
= 0; c
< i
; c
++)
394 System
.out
.println("Failed");
396 System
.out
.println("Ok");
400 /** Tests List.retainAll
402 public boolean retainAll()
404 System
.out
.println("Testing List.retainAll(Collection c)");
405 InterfaceContainer cont
= new InterfaceContainer();
406 boolean r
[]= new boolean[50];
409 cont
.addAll(list1
); //obj1, obj2, obj3
410 cont
.addAll(list2
); //obj1, proxyObj2TypeProv, proxyObj3TypeProv
411 List list
= new ArrayList();
413 list
.add(proxyObj3Weak1
);
415 r
[i
++]= cont
.retainAll(list
);
416 r
[i
++]= cont
.get(0) == obj1
;
417 r
[i
++]= cont
.get(1) == obj3
;
418 r
[i
++]= cont
.get(2) == obj1
;
419 r
[i
++]= cont
.get(3) == proxyObj3TypeProv
;
420 r
[i
++]= 4 == cont
.size();
423 for (int c
= 0; c
< i
; c
++)
426 System
.out
.println("Failed");
428 System
.out
.println("Ok");
432 /** Tests List.set(int index, Object element)
436 System
.out
.println("Testing List.set(int index, Object element)");
437 boolean r
[]= new boolean[50];
439 InterfaceContainer cont
= new InterfaceContainer();
441 Object o1
= cont
.set(0, obj3
);
442 Object o2
= cont
.set(2, proxyObj3Weak1
);
443 r
[i
++]= o1
== list2
.get(0);
444 r
[i
++]= o2
== list2
.get(2);
445 r
[i
++]= cont
.get(0) == obj3
;
446 r
[i
++]= cont
.get(2) == proxyObj3Weak1
;
449 for (int c
= 0; c
< i
; c
++)
452 System
.out
.println("Failed");
454 System
.out
.println("Ok");
458 /** Tests List.toArray(), List.toArray(Object[] a)
460 public boolean toArray()
462 System
.out
.println("Testing List.toArray(), List.toArray(Object[] a)");
463 InterfaceContainer cont
= new InterfaceContainer();
464 boolean r
[]= new boolean[50];
468 Object
[] ar
= cont
.toArray();
469 Object
[] arOrig
= list1
.toArray();
470 r
[i
++]= ar
.length
== arOrig
.length
;
473 for (int c
= 0; c
< ar
.length
; c
++)
474 r
[i
]= r
[i
] && ar
[c
] == arOrig
[c
];
477 XWeak
[] arWeak
= new XWeak
[3];
478 XWeak
[] arWeak2
= (XWeak
[])cont
.toArray(arWeak
);
479 r
[i
++]= ar
.length
== arWeak2
.length
;
481 for (int c
= 0; c
< ar
.length
; c
++)
482 r
[i
]= r
[i
] && ar
[c
] == arWeak2
[c
];
487 for (int c
= 0; c
< i
; c
++)
490 System
.out
.println("Failed");
492 System
.out
.println("Ok");
496 public boolean Iterator_next()
498 System
.out
.println("Testing InterfaceContainer.iterator, Iterator.next()");
499 InterfaceContainer cont
= new InterfaceContainer();
500 boolean r
[]= new boolean[50];
504 Iterator it
= cont
.iterator();
505 r
[i
++]= it
.next() == list1
.get(0);
506 r
[i
++]= it
.next() == list1
.get(1);
507 r
[i
++]= it
.next() == list1
.get(2);
511 }catch(java
.util
.NoSuchElementException ne
)
520 for (int c
= 0; c
< i
; c
++)
523 System
.out
.println("Failed");
525 System
.out
.println("Ok");
529 public boolean Iterator_hasNext()
531 System
.out
.println("Testing, Iterator.next()");
532 InterfaceContainer cont
= new InterfaceContainer();
533 boolean r
[]= new boolean[50];
536 Iterator it
= cont
.iterator();
537 r
[i
++]= ! it
.hasNext();
540 r
[i
++]= it
.hasNext();
542 r
[i
++]= it
.hasNext();
544 r
[i
++]= it
.hasNext();
546 r
[i
++]= ! it
.hasNext();
549 for (int c
= 0; c
< i
; c
++)
552 System
.out
.println("Failed");
554 System
.out
.println("Ok");
558 public boolean Iterator_remove()
560 System
.out
.println("Testing, Iterator.remove()");
561 InterfaceContainer cont
= new InterfaceContainer();
562 boolean r
[]= new boolean[50];
565 Iterator it
= cont
.iterator();
570 catch( IllegalStateException ie
)
574 catch(java
.lang
.Exception e
)
582 r
[i
++]= cont
.isEmpty();
587 catch (IllegalStateException ie
)
603 r
[i
++]= cont
.isEmpty();
605 // 2 iterators, remove must not impair the other iterator
608 int size
= cont
.size();
610 Iterator it2
= cont
.iterator();
618 for( int c
= 0; c
< size
; c
++)
626 r
[i
++]= cont
.size() == 0;
629 for (int c
= 0; c
< i
; c
++)
632 System
.out
.println("Failed");
634 System
.out
.println("Ok");
637 public boolean ListIterator_next()
639 System
.out
.println("Testing InterfaceContainer.listIerator, ListIterator.next()");
640 InterfaceContainer cont
= new InterfaceContainer();
641 boolean r
[]= new boolean[50];
645 Iterator it
= cont
.listIterator();
646 r
[i
++]= it
.next() == list1
.get(0);
647 r
[i
++]= it
.next() == list1
.get(1);
648 r
[i
++]= it
.next() == list1
.get(2);
652 }catch(java
.util
.NoSuchElementException ne
)
661 for (int c
= 0; c
< i
; c
++)
664 System
.out
.println("Failed");
666 System
.out
.println("Ok");
670 public boolean ListIterator_hasNext()
672 System
.out
.println("Testing ListIterator.hasNext()");
673 InterfaceContainer cont
= new InterfaceContainer();
674 boolean r
[]= new boolean[50];
677 Iterator it
= cont
.listIterator();
678 r
[i
++]= ! it
.hasNext();
680 it
= cont
.listIterator();
681 r
[i
++]= it
.hasNext();
683 r
[i
++]= it
.hasNext();
685 r
[i
++]= it
.hasNext();
687 r
[i
++]= ! it
.hasNext();
690 for (int c
= 0; c
< i
; c
++)
693 System
.out
.println("Failed");
695 System
.out
.println("Ok");
699 public boolean ListIterator_remove()
701 System
.out
.println("Testing ListIterator.remove()");
702 InterfaceContainer cont
= new InterfaceContainer();
703 boolean r
[]= new boolean[50];
706 ListIterator it
= cont
.listIterator();
711 catch( IllegalStateException ie
)
715 catch(java
.lang
.Exception e
)
720 it
= cont
.listIterator();
723 r
[i
++]= cont
.isEmpty();
728 catch (IllegalStateException ie
)
738 it
= cont
.listIterator();
744 r
[i
++]= cont
.isEmpty();
746 // 2 iterators, remove must not impair the other iterator
749 int size
= cont
.size();
750 it
= cont
.listIterator();
751 Iterator it2
= cont
.listIterator();
759 for( int c
= 0; c
< size
; c
++)
767 r
[i
++]= cont
.size() == 0;
770 for (int c
= 0; c
< i
; c
++)
773 System
.out
.println("Failed");
775 System
.out
.println("Ok");
779 public boolean ListIterator_hasPrevious()
781 System
.out
.println("Testing ListIterator.hasPrevious()");
782 InterfaceContainer cont
= new InterfaceContainer();
783 boolean r
[]= new boolean[50];
786 ListIterator it
= cont
.listIterator();
787 r
[i
++]= ! it
.hasPrevious();
789 it
= cont
.listIterator();
793 r
[i
++]= it
.hasPrevious();
797 for (int c
= 0; c
< i
; c
++)
800 System
.out
.println("Failed");
802 System
.out
.println("Ok");
806 public boolean ListIterator_previous()
808 System
.out
.println("Testing ListIterator.previous()");
809 InterfaceContainer cont
= new InterfaceContainer();
810 boolean r
[]= new boolean[50];
815 // go to the end of our list and list1
816 ListIterator it
= cont
.listIterator();
819 ListIterator it_list1
= list1
.listIterator();
820 while (it_list1
.hasNext())
823 while (it
.hasPrevious())
825 r
[i
++]= it
.previous() == it_list1
.previous();
832 catch (java
.util
.NoSuchElementException e
)
837 for (int c
= 0; c
< i
; c
++)
840 System
.out
.println("Failed");
842 System
.out
.println("Ok");
846 public boolean ListIterator_nextIndex()
848 System
.out
.println("Testing ListIterator.nextIndex()");
849 InterfaceContainer cont
= new InterfaceContainer();
850 boolean r
[]= new boolean[50];
854 ListIterator it
= cont
.listIterator();
856 it
= cont
.listIterator();
857 r
[i
++]= it
.nextIndex() == 0;
859 r
[i
++]= it
.nextIndex() == 1;
861 r
[i
++]= it
.nextIndex() == 2;
863 for (int c
= 0; c
< i
; c
++)
866 System
.out
.println("Failed");
868 System
.out
.println("Ok");
871 public boolean ListIterator_previousIndex()
873 System
.out
.println("Testing ListIterator.previousIndex()");
874 InterfaceContainer cont
= new InterfaceContainer();
875 boolean r
[]= new boolean[50];
879 ListIterator it
= cont
.listIterator();
881 it
= cont
.listIterator();
885 r
[i
++]= it
.previousIndex() == 2;
887 r
[i
++]= it
.previousIndex() == 1;
889 r
[i
++]= it
.previousIndex() == 0;
892 for (int c
= 0; c
< i
; c
++)
895 System
.out
.println("Failed");
897 System
.out
.println("Ok");
900 public boolean ListIterator_add()
902 System
.out
.println("Testing ListIterator.add()");
903 InterfaceContainer cont
= new InterfaceContainer();
904 boolean r
[]= new boolean[50];
908 ListIterator it
= cont
.listIterator();
910 r
[i
++]= cont
.size() == 1;
912 r
[i
++]= cont
.size() == 2;
914 r
[i
++]= it
.previous() == obj3
;
915 r
[i
++]= it
.previous() == obj2
;
916 r
[i
++]= it
.previous() == obj1
;
918 for (int c
= 0; c
< i
; c
++)
921 System
.out
.println("Failed");
923 System
.out
.println("Ok");
927 public boolean disposeAndClear()
929 System
.out
.println("Testing InterfaceContainer.disposeAndClear");
930 InterfaceContainer cont
= new InterfaceContainer(10);
931 boolean r
[]= new boolean[50];
937 cont
.add(proxyObj1Weak1
);
938 cont
.add(proxyObj3TypeProv
);
939 System
.out
.println("Two proxies are called. Check the output:");
940 cont
.disposeAndClear(new com
.sun
.star
.lang
.EventObject());
941 r
[i
++]= obj1
.nDisposingCalled
== 1;
942 r
[i
++]= obj2
.nDisposingCalled
== 1;
943 r
[i
++]= obj3
.nDisposingCalled
== 1;
945 for (int c
= 0; c
< i
; c
++)
948 System
.out
.println("Failed");
950 System
.out
.println("Ok");
955 public static void main(String
[] args
)
957 InterfaceContainer_Test test
= new InterfaceContainer_Test();
958 boolean r
[]= new boolean[50];
960 r
[i
++]= test
.listConstructors();
961 r
[i
++]= test
.trimToSize();
962 r
[i
++]= test
.ensureCapacity();
964 r
[i
++]= test
.indexOf();
965 r
[i
++]= test
.contains();
966 r
[i
++]= test
.containsAll();
968 r
[i
++]= test
.addAll();
969 r
[i
++]= test
.remove();
970 r
[i
++]= test
.retainAll();
972 r
[i
++]= test
.toArray();
973 r
[i
++]= test
.Iterator_next();
974 r
[i
++]= test
.Iterator_hasNext();
975 r
[i
++]= test
.Iterator_remove();
976 r
[i
++]= test
.ListIterator_next();
977 r
[i
++]= test
.ListIterator_hasNext();
978 r
[i
++]= test
.ListIterator_remove();
979 r
[i
++]= test
.ListIterator_hasPrevious();
980 r
[i
++]= test
.ListIterator_previous();
981 r
[i
++]= test
.ListIterator_nextIndex();
982 r
[i
++]= test
.ListIterator_previousIndex();
983 r
[i
++]= test
.ListIterator_add();
984 r
[i
++]= test
.disposeAndClear();
986 for (int c
= 0; c
< i
; c
++)
989 System
.out
.println("Test finished.\nErrors occured!!!");
991 System
.out
.println("Test finished. \nNo errors.");