Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/gcov
diff options
context:
space:
mode:
authorAndrew Ferrazzutti2015-01-17 01:28:33 +0000
committerAlexander Kurtakov2015-01-17 07:38:58 +0000
commit68398bcbc5e6c75152f6aa4f8a545cec6216b1c2 (patch)
treed664dc0284b35fe3b1ca1aa74cf3a33f13274792 /gcov
parent578f579dfe9e442ba939b0c1b2340237f7ad01a8 (diff)
downloadorg.eclipse.linuxtools-68398bcbc5e6c75152f6aa4f8a545cec6216b1c2.tar.gz
org.eclipse.linuxtools-68398bcbc5e6c75152f6aa4f8a545cec6216b1c2.tar.xz
org.eclipse.linuxtools-68398bcbc5e6c75152f6aa4f8a545cec6216b1c2.zip
Gcov: Minor code cleanup in tests.
Change-Id: I830c553e59a6f459275c46f22e6e4d6da757cf3a Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com> Reviewed-on: https://git.eclipse.org/r/39803 Tested-by: Hudson CI Reviewed-by: Alexander Kurtakov <akurtako@redhat.com> Tested-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'gcov')
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java8
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/ProgressMonitor.java29
2 files changed, 3 insertions, 34 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 f22b93fd64..2e3b83acb7 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
@@ -21,9 +21,7 @@ import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.ILaunchConfigurationType;
@@ -79,7 +77,6 @@ public abstract class GcovTest extends AbstractTest {
@Override
public void run() {
try {
- ResourcesPlugin.getWorkspace().getRoot();
window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPart part = window.getActivePage().getActivePart();
if (part.getTitle().equals("Welcome")) {
@@ -131,11 +128,12 @@ public abstract class GcovTest extends AbstractTest {
@AfterClass
public static void finalCleanUp() {
try {
- project.delete(true, new NullProgressMonitor());
+ project.delete(true, null);
} catch (CoreException e) {
Assert.fail("Project deletion failed");
+ } finally {
+ project = null;
}
- project = null;
}
@Test
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/ProgressMonitor.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/ProgressMonitor.java
deleted file mode 100644
index e4e1c3144a..0000000000
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/ProgressMonitor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 STMicroelectronics.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.internal.gcov.test;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-
-public class ProgressMonitor extends NullProgressMonitor {
-
- private boolean done = false;
-
- public boolean isDone() {
- return done;
- }
-
- @Override
- public void done() {
- super.done();
- done = true;
- }
-
-}

Back to the top