diff options
author | Alexander Kurtakov | 2021-11-08 15:54:42 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2021-11-08 16:41:12 +0000 |
commit | b660e5d1fc81079641ffa1fbb52cb0a833357f4b (patch) | |
tree | 7437f2a73afb2e1d0f92d7ad84bf73aa58b1a8ff /tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests | |
parent | 0262085d05e0a1a5db663029def7bb72350f6d3b (diff) | |
download | eclipse.platform.swt-b660e5d1fc81079641ffa1fbb52cb0a833357f4b.tar.gz eclipse.platform.swt-b660e5d1fc81079641ffa1fbb52cb0a833357f4b.tar.xz eclipse.platform.swt-b660e5d1fc81079641ffa1fbb52cb0a833357f4b.zip |
Streamline Display tests asserts.
Change-Id: Ia9f0536c847f69ad5b77ab0487f135b2bf9ce2cc
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187518
Tested-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests')
-rw-r--r-- | tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java index 2762398ed6..4572ae2181 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2019 IBM Corporation and others. + * Copyright (c) 2000, 2021 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -278,7 +278,7 @@ public void test_getClientArea() { public void test_getCurrent() { Display display = new Display(); try { - assertTrue(display.getThread() == Thread.currentThread()); + assertSame(display.getThread(), Thread.currentThread()); } finally { display.dispose(); } @@ -399,7 +399,7 @@ public void test_getShells() { try { Shell shell1 = new Shell(display); Shell shell2 = new Shell(display); - assertTrue(display.getShells().length == 2); + assertEquals(2, display.getShells().length); shell1.dispose(); shell2.dispose(); } finally { @@ -483,7 +483,7 @@ public void test_getSystemFont() { public void test_getThread() { Display display = new Display(); try { - assertTrue(display.getThread() == Thread.currentThread()); + assertSame(display.getThread(), Thread.currentThread()); } finally { display.dispose(); } @@ -1250,7 +1250,7 @@ public void test_setDataLjava_lang_Object() { display.setData(Integer.valueOf(10)); Integer i = (Integer)display.getData(); assertNotNull(i); - assertTrue(i.equals(Integer.valueOf(10))); + assertEquals(Integer.valueOf(10), i); } finally { display.dispose(); } @@ -1264,10 +1264,10 @@ public void test_setDataLjava_lang_StringLjava_lang_Object() { display.setData("String", "xyz"); Integer i = (Integer)display.getData("Integer"); assertNotNull(i); - assertTrue(i.equals(Integer.valueOf(10))); + assertEquals(Integer.valueOf(10), i); String s = (String)display.getData("String"); assertNotNull(s); - assertTrue(s.equals("xyz")); + assertEquals("xyz", s); } finally { display.dispose(); } |