Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2020-03-12 08:54:05 +0000
committerAlexander Kurtakov2020-03-12 08:54:05 +0000
commitbda5144a2217ca7193453028031dced2b554ff09 (patch)
treef230618425075ed6ee0d7d4310b9b2587f6e50a8
parentdb26428a61cf828798bf52dd7c8d24c3805736d8 (diff)
downloadeclipse.platform-bda5144a2217ca7193453028031dced2b554ff09.tar.gz
eclipse.platform-bda5144a2217ca7193453028031dced2b554ff09.tar.xz
eclipse.platform-bda5144a2217ca7193453028031dced2b554ff09.zip
* Remove useless overrides just calling super. * Convert APITests to POJO Change-Id: Iff5a1606f698aefa2cead69238ca493e96e13e4e Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/APITests.java11
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java31
2 files changed, 12 insertions, 30 deletions
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/APITests.java b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/APITests.java
index 7569f2a7d..b3934b96f 100644
--- a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/APITests.java
+++ b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/APITests.java
@@ -13,15 +13,14 @@
*******************************************************************************/
package org.eclipse.ant.tests.ui;
-import org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest;
-import org.eclipse.jdt.core.JavaCore;
+import static org.junit.Assert.assertEquals;
-public class APITests extends AbstractAntUITest {
+import org.eclipse.jdt.core.JavaCore;
+import org.junit.Test;
- public APITests(String name) {
- super(name);
- }
+public class APITests {
+ @Test
public void testCompareJavaVersions() {
String vmver = "1.6"; //$NON-NLS-1$
int comparison = JavaCore.compareJavaVersions(vmver, JavaCore.VERSION_1_7);
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java
index b2b2ff2a5..616f466a6 100644
--- a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java
+++ b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java
@@ -34,7 +34,8 @@ public abstract class AbstractAntUIBuildTest extends AbstractAntUITest {
}
/**
- * Runs the test and collects the result in a TestResult without blocking the UI thread.
+ * Runs the test and collects the result in a TestResult without blocking the UI
+ * thread.
*/
@Override
public void run(final TestResult result) {
@@ -48,8 +49,7 @@ public abstract class AbstractAntUIBuildTest extends AbstractAntUITest {
};
thread = new Thread(r);
thread.start();
- }
- catch (Exception e) {
+ } catch (Exception e) {
e.printStackTrace();
}
@@ -57,30 +57,17 @@ public abstract class AbstractAntUIBuildTest extends AbstractAntUITest {
try {
if (!display.readAndDispatch())
display.sleep();
- }
- catch (Throwable e) {
+ } catch (Throwable e) {
e.printStackTrace();
}
}
}
/**
- * Launches the Ant build with the buildfile name (no extension). Waits for all of the lines to be appended to the console.
- *
- * @param buildFileName
- * the buildfile to execute
- * @return thread in which the first suspend event occurred
- */
- @Override
- protected void launch(String buildFileName) throws CoreException {
- super.launch(buildFileName);
- }
-
- /**
- * Launches the launch configuration Waits for all of the lines to be appended to the console.
+ * Launches the launch configuration Waits for all of the lines to be appended
+ * to the console.
*
- * @param config
- * the config to execute
+ * @param config the config to execute
* @return thread in which the first suspend event occurred
*/
protected void launch(ILaunchConfiguration config) throws CoreException {
@@ -91,8 +78,4 @@ public abstract class AbstractAntUIBuildTest extends AbstractAntUITest {
Display.getDefault().asyncExec(() -> link.linkActivated());
}
- @Override
- protected void launch(String buildFileName, String arguments) throws CoreException {
- super.launch(buildFileName, arguments);
- }
}

Back to the top