Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-04-26 02:40:50 -0400
committerAndrey Loskutov2017-04-26 04:53:50 -0400
commit2bbe9def0b1520c359321e873d5abe1bb781ca19 (patch)
tree351e979cce3299d51d464d947def13ba8a2f7c63
parentdf17a90ffe71e042d60710d86356c9a4c95956e8 (diff)
downloadeclipse.platform.debug-2bbe9def0b1520c359321e873d5abe1bb781ca19.tar.gz
eclipse.platform.debug-2bbe9def0b1520c359321e873d5abe1bb781ca19.tar.xz
eclipse.platform.debug-2bbe9def0b1520c359321e873d5abe1bb781ca19.zip
Bug 511607 - don't use assertTrue(x == y), use assertEquals(x, y)Y20170427-1000I20170426-2000
Change-Id: I03c07522e3bd963103e18f482770964d82eea6fe Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchGroupTests.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchGroupTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchGroupTests.java
index f8a5d8634..a15ddbdf5 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchGroupTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchGroupTests.java
@@ -122,7 +122,7 @@ public class LaunchGroupTests extends AbstractLaunchTest {
grp.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
ILaunchConfiguration[] history = runHistory.getHistory();
- assertTrue("history should be size 3", history.length == 3); //$NON-NLS-1$
+ assertEquals(3, history.length);
assertTrue("history[0] should be Test Group", history[0].contentsEqual(grp)); //$NON-NLS-1$
assertTrue("history[1] should be Test2", history[1].contentsEqual(t2)); //$NON-NLS-1$
assertTrue("history[2] should be Test1", history[2].contentsEqual(t1)); //$NON-NLS-1$
@@ -141,7 +141,7 @@ public class LaunchGroupTests extends AbstractLaunchTest {
assertTrue("delay was not awaited", (System.currentTimeMillis() - start) >= 2000); //$NON-NLS-1$
ILaunchConfiguration[] history = runHistory.getHistory();
- assertTrue("history should be size 3", history.length == 3); //$NON-NLS-1$
+ assertEquals(3, history.length);
assertTrue("history[0] should be Test Group", history[0].contentsEqual(grp)); //$NON-NLS-1$
assertTrue("history[1] should be Test2", history[1].contentsEqual(t2)); //$NON-NLS-1$
assertTrue("history[2] should be Test1", history[2].contentsEqual(t1)); //$NON-NLS-1$
@@ -187,7 +187,7 @@ public class LaunchGroupTests extends AbstractLaunchTest {
// terminate? don't think so - at least run the code path to have it
// covered.
ILaunchConfiguration[] history = runHistory.getHistory();
- assertTrue("history should be size 3", history.length == 3); //$NON-NLS-1$
+ assertEquals(3, history.length);
assertTrue("history[0] should be Test Group", history[0].contentsEqual(grp)); //$NON-NLS-1$
assertTrue("history[1] should be Test2", history[1].contentsEqual(t2)); //$NON-NLS-1$
assertTrue("history[2] should be Test1", history[2].contentsEqual(t1)); //$NON-NLS-1$
@@ -206,10 +206,10 @@ public class LaunchGroupTests extends AbstractLaunchTest {
grp.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
ILaunchConfiguration[] history = runHistory.getHistory();
- assertTrue("history should be size 2", history.length == 2); //$NON-NLS-1$
+ assertEquals(2, history.length);
assertTrue("history[0] should be Test Group", history[0].contentsEqual(grp)); //$NON-NLS-1$
assertTrue("history[1] should be Test1", history[1].contentsEqual(t1)); //$NON-NLS-1$
- assertTrue("Test1 should be launched only once", launchCount.get() == 1); //$NON-NLS-1$
+ assertEquals("Test1 should be launched only once", 1, launchCount.get()); //$NON-NLS-1$
}
public void testAdoptComplex() throws Exception {
@@ -231,12 +231,12 @@ public class LaunchGroupTests extends AbstractLaunchTest {
grp3.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
ILaunchConfiguration[] history = runHistory.getHistory();
- assertTrue("history should be size 4", history.length == 4); //$NON-NLS-1$
+ assertEquals(4, history.length);
assertTrue("history[0] should be Group 3", history[0].contentsEqual(grp3)); //$NON-NLS-1$
assertTrue("history[1] should be Group 2", history[1].contentsEqual(grp2)); //$NON-NLS-1$
assertTrue("history[2] should be Group 1", history[2].contentsEqual(grp)); //$NON-NLS-1$
assertTrue("history[3] should be Test1", history[3].contentsEqual(t1)); //$NON-NLS-1$
- assertTrue("Test1 should be launched only once", launchCount.get() == 1); //$NON-NLS-1$
+ assertEquals("Test1 should be launched only once", 1, launchCount.get()); //$NON-NLS-1$
}
public void testWaitForOutput() throws Exception {
@@ -279,7 +279,7 @@ public class LaunchGroupTests extends AbstractLaunchTest {
assertTrue("output was not awaited", (System.currentTimeMillis() - start) >= 2000); //$NON-NLS-1$
ILaunchConfiguration[] history = runHistory.getHistory();
- assertTrue("history should be size 3", history.length == 3); //$NON-NLS-1$
+ assertEquals(3, history.length);
assertTrue("history[0] should be Test Group", history[0].contentsEqual(grp)); //$NON-NLS-1$
assertTrue("history[1] should be Test2", history[1].contentsEqual(t2)); //$NON-NLS-1$
assertTrue("history[2] should be Test1", history[2].contentsEqual(t1)); //$NON-NLS-1$

Back to the top