diff options
author | Felipe Heidrich <fheidric> | 2009-11-04 16:13:33 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2009-11-04 16:13:33 +0000 |
commit | 3eb860087db11fa1bfa2323409dca3c92d0986a2 (patch) | |
tree | 2a22c5341ce2eb0871421b374dbe9bb05e4cdb17 /tests | |
parent | 647db4b73b972bea8b18bb91f59b29a39aa07969 (diff) | |
download | eclipse.platform.swt-3eb860087db11fa1bfa2323409dca3c92d0986a2.tar.gz eclipse.platform.swt-3eb860087db11fa1bfa2323409dca3c92d0986a2.tar.xz eclipse.platform.swt-3eb860087db11fa1bfa2323409dca3c92d0986a2.zip |
*** empty log message ***
Diffstat (limited to 'tests')
4 files changed, 16 insertions, 2 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllCarbonTests.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllCarbonTests.java index ca815ce864..7921761993 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllCarbonTests.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllCarbonTests.java @@ -63,6 +63,7 @@ static String[] excludeTests = { "test_getLineBounds(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_TextLayout)", "test_getLocation(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_TextLayout)", "test_getNextOffset(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_TextLayout)", + "test_getNextOffset2(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_TextLayout)", "test_getOffset(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_TextLayout)", }; diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllCocoaTests.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllCocoaTests.java index 84ef48031e..623bb9d2b6 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllCocoaTests.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllCocoaTests.java @@ -50,6 +50,7 @@ static String[] excludeTests = { "test_getLineBounds(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_TextLayout)", "test_getLocation(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_TextLayout)", "test_getNextOffset(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_TextLayout)", + "test_getNextOffset2(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_TextLayout)", "test_getOffset(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_TextLayout)", }; diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllGtkTests.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllGtkTests.java index 8b7f79b418..5ca2a3ecf1 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllGtkTests.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllGtkTests.java @@ -44,6 +44,9 @@ static String[] excludeTests = { "test_getSelectionIndex(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo)", "test_getRowCount(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ToolBar)", "test_getHeaderHeight(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Table)", + + //text layout + "test_getNextOffset2(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_TextLayout)", }; static boolean isExcluded(String name) { diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_TextLayout.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_TextLayout.java index 4f39b55e79..7784dc55ff 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_TextLayout.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_TextLayout.java @@ -392,7 +392,6 @@ public void test_getNextOffset() { TextLayout layout = new TextLayout(display); String text = "AB \u05E9\u05E0 CD\nHello"; layout.setText(text); - //NOTE SWT.MOVEMENT_WORD is platform specific int offset = 0; offset = layout.getNextOffset(offset, SWT.MOVEMENT_WORD_START); assertEquals(3, offset); @@ -433,7 +432,15 @@ public void test_getNextOffset() { for (int i = text.length(); i > 0; i--) { assertEquals(i-1, layout.getPreviousOffset(i, SWT.MOVEMENT_CLUSTER)); } - text = "oi\u0E19\u0E49\u0E33oi"; + layout.dispose(); +} + +public void test_getNextOffset2() { + //Text thai cluster separate so it can be excluded + //for gtk, testing machine (rhel4) is too old to + //support thai. + TextLayout layout = new TextLayout(display); + String text = "oi\u0E19\u0E49\u0E33oi"; layout.setText(text); assertEquals(5, layout.getNextOffset(2, SWT.MOVEMENT_CLUSTER)); assertEquals(2, layout.getPreviousOffset(5, SWT.MOVEMENT_CLUSTER)); @@ -574,6 +581,7 @@ public static java.util.Vector methodNames() { methodNames.addElement("test_getLineSpacing"); methodNames.addElement("test_getLocation"); methodNames.addElement("test_getNextOffset"); + methodNames.addElement("test_getNextOffset2"); methodNames.addElement("test_getOffset"); methodNames.addElement("test_getTabs"); methodNames.addElement("test_getSegments"); @@ -592,6 +600,7 @@ protected void runTest() throws Throwable { else if (name.equals("test_getLineSpacing")) test_getLineSpacing(); else if (name.equals("test_getLocation")) test_getLocation(); else if (name.equals("test_getNextOffset")) test_getNextOffset(); + else if (name.equals("test_getNextOffset2")) test_getNextOffset2(); else if (name.equals("test_getOffset")) test_getOffset(); else if (name.equals("test_getTabs")) test_getTabs(); else if (name.equals("test_getSegments")) test_getSegments(); |