summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2006-10-25 16:46:15 +0000
committerGrant Gayed <ggayed>2006-10-25 16:46:15 +0000
commitbf68a2fd12828043b04e53ee5e0f53e756fc017e (patch)
tree68dcf53b135b77de07b4d3108cf340bf58f29128 /tests
parentd70b51cbd37f8cdd6b9f5f3c538a1268b1660ca1 (diff)
downloadeclipse.platform.swt-bf68a2fd12828043b04e53ee5e0f53e756fc017e.tar.gz
eclipse.platform.swt-bf68a2fd12828043b04e53ee5e0f53e756fc017e.tar.xz
eclipse.platform.swt-bf68a2fd12828043b04e53ee5e0f53e756fc017e.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_custom_CCombo.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CCombo.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CCombo.java
index 2570ec9190..06de1151fc 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CCombo.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CCombo.java
@@ -13,6 +13,7 @@ package org.eclipse.swt.tests.junit;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.graphics.Point;
import junit.framework.*;
import junit.textui.*;
@@ -46,6 +47,22 @@ public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
}
+public void test_copy() {
+ ccombo.setText("123456");
+ ccombo.setSelection(new Point(1,3));
+ ccombo.copy();
+ ccombo.setSelection(new Point(0,0));
+ ccombo.paste();
+ assertTrue(":a:", ccombo.getText().equals("23123456"));
+}
+
+public void test_cut() {
+ ccombo.setText("123456");
+ ccombo.setSelection(new Point(1,3));
+ ccombo.cut();
+ assertTrue(":a:", ccombo.getText().equals("1456"));
+}
+
public void test_addLjava_lang_String() {
warnUnimpl("Test test_addLjava_lang_String not written");
}
@@ -138,6 +155,15 @@ public void test_isFocusControl() {
warnUnimpl("Test test_isFocusControl not written");
}
+public void test_paste() {
+ ccombo.setText("123456");
+ ccombo.setSelection(new Point(1,3));
+ ccombo.cut();
+ assertTrue(":a:", ccombo.getText().equals("1456"));
+ ccombo.paste();
+ assertTrue(":a:", ccombo.getText().equals("123456"));
+}
+
public void test_redraw() {
warnUnimpl("Test test_redraw not written");
}
@@ -245,6 +271,8 @@ public static java.util.Vector methodNames() {
methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
methodNames.addElement("test_clearSelection");
methodNames.addElement("test_computeSizeIIZ");
+ methodNames.addElement("test_copy");
+ methodNames.addElement("test_cut");
methodNames.addElement("test_deselectAll");
methodNames.addElement("test_deselectI");
methodNames.addElement("test_getChildren");
@@ -262,6 +290,7 @@ public static java.util.Vector methodNames() {
methodNames.addElement("test_indexOfLjava_lang_String");
methodNames.addElement("test_indexOfLjava_lang_StringI");
methodNames.addElement("test_isFocusControl");
+ methodNames.addElement("test_paste");
methodNames.addElement("test_redraw");
methodNames.addElement("test_redrawIIIIZ");
methodNames.addElement("test_removeAll");
@@ -301,6 +330,8 @@ protected void runTest() throws Throwable {
else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
else if (getName().equals("test_clearSelection")) test_clearSelection();
else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
+ else if (getName().equals("test_copy")) test_copy();
+ else if (getName().equals("test_cut")) test_cut();
else if (getName().equals("test_deselectAll")) test_deselectAll();
else if (getName().equals("test_deselectI")) test_deselectI();
else if (getName().equals("test_getChildren")) test_getChildren();
@@ -318,6 +349,7 @@ protected void runTest() throws Throwable {
else if (getName().equals("test_indexOfLjava_lang_String")) test_indexOfLjava_lang_String();
else if (getName().equals("test_indexOfLjava_lang_StringI")) test_indexOfLjava_lang_StringI();
else if (getName().equals("test_isFocusControl")) test_isFocusControl();
+ else if (getName().equals("test_paste")) test_paste();
else if (getName().equals("test_redraw")) test_redraw();
else if (getName().equals("test_redrawIIIIZ")) test_redrawIIIIZ();
else if (getName().equals("test_removeAll")) test_removeAll();