summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristophe Cornu <ccornu>2003-02-28 15:49:16 +0000
committerChristophe Cornu <ccornu>2003-02-28 15:49:16 +0000
commit59413fd4d9b8df0d28707336605ba255af628992 (patch)
tree38c85ab316c4559283383f58cf6356dd9e9028bd /tests
parent88b4b8328967cd158235c96b47bec973d6f6aab2 (diff)
downloadeclipse.platform.swt-59413fd4d9b8df0d28707336605ba255af628992.tar.gz
eclipse.platform.swt-59413fd4d9b8df0d28707336605ba255af628992.tar.xz
eclipse.platform.swt-59413fd4d9b8df0d28707336605ba255af628992.zip
*** empty log message ***
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tree.java23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tree.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tree.java
index 43289b891e..9239074594 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tree.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tree.java
@@ -175,7 +175,7 @@ public void test_getSelectionCount(){
}
public void test_getTopItem() {
- warnUnimpl("Test test_getTopItem not written");
+// tested in test_setTopItemLorg_eclipse_swt_widgets_TreeItem
}
public void test_removeAll() {
@@ -405,7 +405,26 @@ public void test_setSelection$Lorg_eclipse_swt_widgets_TreeItem(){
}
public void test_setTopItemLorg_eclipse_swt_widgets_TreeItem() {
- warnUnimpl("Test test_setTopItemLorg_eclipse_swt_widgets_TreeItem not written");
+ tree.removeAll();
+ for (int i = 0; i < 10; i++) {
+ TreeItem item = new TreeItem(tree, 0);
+ }
+ TreeItem top = new TreeItem(tree, 0);
+ for (int i = 0; i < 10; i++) {
+ TreeItem item = new TreeItem(tree, 0);
+ }
+ tree.setTopItem(top);
+ for (int i = 0; i < 10; i++) {
+ TreeItem item = new TreeItem(tree, 0);
+ }
+ TreeItem top2 = tree.getTopItem();
+ assertEquals(top, top2);
+ try {
+ tree.setTopItem(null);
+ fail("No exception thrown for item == null");
+ }
+ catch (IllegalArgumentException e) {
+ }
}
public void test_showItemLorg_eclipse_swt_widgets_TreeItem(){