Skip to content

Commit 2067b12

Browse files
committed
Test Text.getLineDelimiter not only on Windows
Some minor syntax improvements too.
1 parent 648a444 commit 2067b12

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,8 @@ public void test_getLineDelimiter() {
517517
String delimiter = text.getLineDelimiter();
518518
if (platform.equals("win32")) {
519519
assertEquals("\r\n", delimiter);
520+
} else {
521+
assertEquals("\n", delimiter);
520522
}
521523
}
522524

@@ -1083,12 +1085,9 @@ public void test_setEditableZ() {
10831085
@Test
10841086
public void test_setFontLorg_eclipse_swt_graphics_Font() {
10851087
FontData fontData = text.getFont().getFontData()[0];
1086-
int lineHeight;
1087-
Font font;
1088-
1089-
font = new Font(text.getDisplay(), fontData.getName(), 8, fontData.getStyle());
1088+
Font font = new Font(text.getDisplay(), fontData.getName(), 8, fontData.getStyle());
10901089
text.setFont(font);
1091-
lineHeight = text.getLineHeight();
1090+
int lineHeight = text.getLineHeight();
10921091
text.setFont(null);
10931092
font.dispose();
10941093
font = new Font(text.getDisplay(), fontData.getName(), 12, fontData.getStyle());

0 commit comments

Comments
 (0)