diff options
-rw-r--r-- | tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CCombo.java | 32 |
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(); |