Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/gcov
diff options
context:
space:
mode:
authorAlexander Kurtakov2014-04-07 09:55:05 +0000
committerAlexander Kurtakov2014-04-07 10:35:38 +0000
commita474fd01f0f9450a83e223277085f5c530bb273d (patch)
treed609b665731d686facb719c2acd91d8fbd41ce41 /gcov
parentf9efc19ba33d3aaa6f0cf799c2f22ce4ecff0078 (diff)
downloadorg.eclipse.linuxtools-a474fd01f0f9450a83e223277085f5c530bb273d.tar.gz
org.eclipse.linuxtools-a474fd01f0f9450a83e223277085f5c530bb273d.tar.xz
org.eclipse.linuxtools-a474fd01f0f9450a83e223277085f5c530bb273d.zip
tests: Use more appropriate junit assert methods.
Improves readability: * assertTrue(!condition) -> assertFalse(condition) * assertTrue(a == b) -> assertEquals(a, b) and other similar Change-Id: Iea7478cac9eb0278b7dcfa5702c115004ba7b5ae Signed-off-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-on: https://git.eclipse.org/r/24530 Tested-by: Hudson CI
Diffstat (limited to 'gcov')
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
index 003aa4e78b..8f20fbe1aa 100644
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
@@ -2,6 +2,7 @@ package org.eclipse.linuxtools.internal.gcov.test;
import static org.eclipse.swtbot.swt.finder.finders.ContextMenuHelper.contextMenu;
import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withText;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import java.io.File;
@@ -46,7 +47,6 @@ import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.hamcrest.Matcher;
-import org.junit.Assert;
import org.osgi.framework.FrameworkUtil;
public abstract class GcovTest {
@@ -360,7 +360,7 @@ public abstract class GcovTest {
break;
}
}
- Assert.assertTrue(treeBot.selectionCount() != 0);
+ assertNotEquals(treeBot.selectionCount(), 0);
String menuItem = "Profiling Tools";
String subMenuItem = "1 Profile Code Coverage";
click(contextMenu(treeBot, menuItem, subMenuItem));

Back to the top