diff options
author | Felipe Heidrich <fheidric> | 2009-11-17 20:53:00 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2009-11-17 20:53:00 +0000 |
commit | 3dcdb69260a8d0386d7bd3821e11a38117c3042c (patch) | |
tree | 275a3f7f8c31861fc98a3017a542b04d155e8034 /tests | |
parent | 6df9392abc945b864e29234fc0603982ed613649 (diff) | |
download | eclipse.platform.swt-3dcdb69260a8d0386d7bd3821e11a38117c3042c.tar.gz eclipse.platform.swt-3dcdb69260a8d0386d7bd3821e11a38117c3042c.tar.xz eclipse.platform.swt-3dcdb69260a8d0386d7bd3821e11a38117c3042c.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_graphics_TextLayout.java | 27 |
1 files changed, 24 insertions, 3 deletions
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 a080bdfa23..455ad5f4c9 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 @@ -549,11 +549,32 @@ public void test_getNextOffset() { layout.setText(text); offset = 0; offset = layout.getNextOffset(offset, SWT.MOVEMENT_WORD_END); - assertEquals(3, offset); + assertEquals(4, offset); offset = layout.getNextOffset(offset, SWT.MOVEMENT_WORD_END); - assertEquals(8, offset); + assertEquals(9, offset); offset = layout.getNextOffset(offset, SWT.MOVEMENT_WORD_END); - assertEquals(13, offset); + assertEquals(14, offset); + offset = layout.getPreviousOffset(offset, SWT.MOVEMENT_WORD_END); + assertEquals(9, offset); + offset = layout.getPreviousOffset(offset, SWT.MOVEMENT_WORD_END); + assertEquals(4, offset); + offset = layout.getPreviousOffset(offset, SWT.MOVEMENT_WORD_END); + assertEquals(0, offset); + + offset = layout.getNextOffset(offset, SWT.MOVEMENT_WORD_START); + assertEquals(5, offset); + offset = layout.getNextOffset(offset, SWT.MOVEMENT_WORD_START); + assertEquals(10, offset); + offset = layout.getNextOffset(offset, SWT.MOVEMENT_WORD_START); + assertEquals(14, offset); + offset = layout.getPreviousOffset(offset, SWT.MOVEMENT_WORD_START); + assertEquals(10, offset); + offset = layout.getPreviousOffset(offset, SWT.MOVEMENT_WORD_START); + assertEquals(5, offset); + offset = layout.getPreviousOffset(offset, SWT.MOVEMENT_WORD_START); + assertEquals(0, offset); + + text = "AB \u05E9\u05E0 CD\nHello"; layout.setText(text); |