|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2002, 2008 Innoopract Informationssysteme GmbH. |
2 |
* Copyright (c) 2002, 2009 Innoopract Informationssysteme GmbH. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 757-762
Link Here
|
| 757 |
assertEquals( 0, list.getSelectionIndices()[ 0 ] ); |
757 |
assertEquals( 0, list.getSelectionIndices()[ 0 ] ); |
| 758 |
assertEquals( 1, list.getSelectionIndices()[ 1 ] ); |
758 |
assertEquals( 1, list.getSelectionIndices()[ 1 ] ); |
| 759 |
assertEquals( 2, list.getSelectionIndices()[ 2 ] ); |
759 |
assertEquals( 2, list.getSelectionIndices()[ 2 ] ); |
|
|
760 |
|
| 761 |
// Ensure that no selection indices after remove all items one by one |
| 762 |
list.removeAll(); |
| 763 |
list.add( "item0" ); |
| 764 |
list.add( "item1" ); |
| 765 |
list.add( "item2" ); |
| 766 |
list.select( new int[] { 0, 1, 2 } ); |
| 767 |
String[] listSelection = list.getSelection(); |
| 768 |
for( int i = 0; i < listSelection.length; i++ ) { |
| 769 |
list.remove( listSelection[ i ] ); |
| 770 |
} |
| 771 |
assertEquals( 0, list.getSelectionCount() ); |
| 772 |
|
| 773 |
// Ensure that no selection indices after remove selected items one by one |
| 774 |
list.removeAll(); |
| 775 |
list.add( "item0" ); |
| 776 |
list.add( "item1" ); |
| 777 |
list.add( "item2" ); |
| 778 |
list.select( new int[] { 0, 1 } ); |
| 779 |
listSelection = list.getSelection(); |
| 780 |
for( int i = 0; i < listSelection.length; i++ ) { |
| 781 |
list.remove( listSelection[ i ] ); |
| 782 |
} |
| 783 |
assertEquals( 0, list.getSelectionCount() ); |
| 760 |
} |
784 |
} |
| 761 |
|
785 |
|
| 762 |
public void testSetItem() { |
786 |
public void testSetItem() { |