Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2016-02-15 12:25:21 +0000
committerMarkus Keller2016-04-04 20:12:23 +0000
commitbf92a4cb5abe8883e4e875a2e841279558dc657b (patch)
treee81b79d5c0de87b44e13120e7cb559122d7c2f34
parent6820a987eaf2d9ee917064486a01eeff5339b906 (diff)
downloadeclipse.platform.text-bf92a4cb5abe8883e4e875a2e841279558dc657b.tar.gz
eclipse.platform.text-bf92a4cb5abe8883e4e875a2e841279558dc657b.tar.xz
eclipse.platform.text-bf92a4cb5abe8883e4e875a2e841279558dc657b.zip
Bug 487095: Move test bundles to JUnit 4Y20160407-1000I20160405-0800
- implement JUnitSourceSetup as ExternalResource - clean up test suites - update manifests - use @Rule TestName to access test method names FindReplaceDialogTest: - fix test order - fix wrong @Before tearDown() Change-Id: Ibae60f592ea81dbbf2fab0db8daf64f92301dcdd
-rw-r--r--org.eclipse.core.filebuffers.tests/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersTestSuite.java34
-rw-r--r--org.eclipse.jface.text.tests/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractPairMatcherTest.java2
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/JFaceTextTestSuite.java34
-rw-r--r--org.eclipse.search.tests/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/core/tests/AllSearchModelTests.java16
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/AllSearchTests.java9
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AllFileSearchTests.java46
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AnnotationManagerTest.java6
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/FileCharSequenceTests.java4
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/FileSearchTests.java9
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/JUnitSourceSetup.java61
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/LineAnnotationManagerTest.java9
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/PositionTrackerTest.java6
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SearchResultPageTest.java11
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SortingTest.java9
-rw-r--r--org.eclipse.text.tests/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.text.tests/projection/org/eclipse/text/tests/ProjectionTestSuite.java10
-rw-r--r--org.eclipse.text.tests/src/org/eclipse/text/tests/EclipseTextTestSuite.java38
-rw-r--r--org.eclipse.text.tests/src/org/eclipse/text/tests/link/LinkTestSuite.java14
-rwxr-xr-xorg.eclipse.text.tests/src/org/eclipse/text/tests/templates/TemplatesTestSuite.java9
-rw-r--r--org.eclipse.ui.editors.tests/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.ui.editors.tests/src/org/eclipse/ui/editors/tests/EditorsTestSuite.java14
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java24
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java11
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/WorkbenchTextEditorTestSuite.java18
-rwxr-xr-xorg.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/rulers/RulerTestSuite.java8
29 files changed, 253 insertions, 163 deletions
diff --git a/org.eclipse.core.filebuffers.tests/META-INF/MANIFEST.MF b/org.eclipse.core.filebuffers.tests/META-INF/MANIFEST.MF
index 1287b94cc..e9efaa598 100644
--- a/org.eclipse.core.filebuffers.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.core.filebuffers.tests/META-INF/MANIFEST.MF
@@ -14,6 +14,6 @@ Require-Bundle:
org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
org.eclipse.core.filebuffers;bundle-version="[3.5.0,4.0.0)",
org.eclipse.text;bundle-version="[3.5.0,4.0.0)",
- org.junit;bundle-version="3.8.2"
+ org.junit;bundle-version="4.12.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Eclipse-BundleShape: dir
diff --git a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersTestSuite.java b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersTestSuite.java
index b3f333144..a84d7550c 100644
--- a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersTestSuite.java
+++ b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersTestSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -23,21 +23,21 @@ import org.junit.runners.Suite.SuiteClasses;
* @since 3.0
*/
@RunWith(Suite.class)
-@SuiteClasses({FileBufferCreation.class,
- FileBuffersForWorkspaceFiles.class,
- FileBuffersForExternalFiles.class,
- FileBuffersForLinkedFiles.class,
- FileBuffersForFilesInLinkedFolders.class,
- FileBuffersForNonExistingExternalFiles.class,
- FileBuffersForNonExistingWorkspaceFiles.class,
- FileBuffersForNonAccessibleWorkspaceFiles.class,
- FileStoreFileBuffersForWorkspaceFiles.class,
- FileStoreFileBuffersForExternalFiles.class,
- FileStoreFileBuffersForNonExistingExternalFiles.class,
- FileStoreFileBuffersForNonExistingWorkspaceFiles.class,
- TextFileManagerDocCreationTests.class,
- ResourceTextFileManagerDocCreationTests.class
- })
+@SuiteClasses({ FileBufferCreation.class,
+ FileBuffersForWorkspaceFiles.class,
+ FileBuffersForExternalFiles.class,
+ FileBuffersForLinkedFiles.class,
+ FileBuffersForFilesInLinkedFolders.class,
+ FileBuffersForNonExistingExternalFiles.class,
+ FileBuffersForNonExistingWorkspaceFiles.class,
+ FileBuffersForNonAccessibleWorkspaceFiles.class,
+ FileStoreFileBuffersForWorkspaceFiles.class,
+ FileStoreFileBuffersForExternalFiles.class,
+ FileStoreFileBuffersForNonExistingExternalFiles.class,
+ FileStoreFileBuffersForNonExistingWorkspaceFiles.class,
+ TextFileManagerDocCreationTests.class,
+ ResourceTextFileManagerDocCreationTests.class
+})
public class FileBuffersTestSuite {
- //intentionally left empty
+ // see @SuiteClasses
}
diff --git a/org.eclipse.jface.text.tests/META-INF/MANIFEST.MF b/org.eclipse.jface.text.tests/META-INF/MANIFEST.MF
index c706fce5f..3fdcd1f40 100644
--- a/org.eclipse.jface.text.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.jface.text.tests/META-INF/MANIFEST.MF
@@ -12,7 +12,7 @@ Export-Package:
Require-Bundle:
org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
org.eclipse.jface;bundle-version="[3.5.0,4.0.0)",
- org.junit;bundle-version="3.8.2",
+ org.junit;bundle-version="4.12.0",
org.eclipse.text.tests;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractPairMatcherTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractPairMatcherTest.java
index 1e26325de..43f56757f 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractPairMatcherTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractPairMatcherTest.java
@@ -44,7 +44,7 @@ import org.eclipse.jface.text.source.ICharacterPairMatcherExtension;
*/
public abstract class AbstractPairMatcherTest {
- private boolean fCaretEitherSideOfBracket;
+ private final boolean fCaretEitherSideOfBracket;
public AbstractPairMatcherTest(boolean caretEitherSideOfBracket) {
fCaretEitherSideOfBracket= caretEitherSideOfBracket;
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/JFaceTextTestSuite.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/JFaceTextTestSuite.java
index a58187309..b8a47db32 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/JFaceTextTestSuite.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/JFaceTextTestSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -29,21 +29,23 @@ import org.eclipse.jface.text.tests.rules.WordRuleTest;
*/
@RunWith(Suite.class)
@SuiteClasses({
- HTML2TextReaderTest.class,
- TextHoverPopupTest.class,
- TextPresentationTest.class,
- DefaultUndoManagerTest.class,
- TextViewerTest.class,
- TextViewerUndoManagerTest.class,
- DefaultPairMatcherTest.class,
- DefaultPairMatcherTest2.class,
- AbstractReconcilerTest.class,
- DefaultPartitionerTest.class,
- DefaultPartitionerZeroLengthTest.class,
- FastPartitionerTest.class,
- ScannerColumnTest.class,
- WordRuleTest.class
+ HTML2TextReaderTest.class,
+ TextHoverPopupTest.class,
+ TextPresentationTest.class,
+ DefaultUndoManagerTest.class,
+ TextViewerTest.class,
+ TextViewerUndoManagerTest.class,
+ DefaultPairMatcherTest.class,
+ DefaultPairMatcherTest2.class,
+
+ AbstractReconcilerTest.class,
+
+ DefaultPartitionerTest.class,
+ DefaultPartitionerZeroLengthTest.class,
+ FastPartitionerTest.class,
+ ScannerColumnTest.class,
+ WordRuleTest.class
})
public class JFaceTextTestSuite {
-// intentionally left empty
+ // see @SuiteClasses
}
diff --git a/org.eclipse.search.tests/META-INF/MANIFEST.MF b/org.eclipse.search.tests/META-INF/MANIFEST.MF
index 6169cd8bb..3af2eae61 100644
--- a/org.eclipse.search.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.search.tests/META-INF/MANIFEST.MF
@@ -15,7 +15,7 @@ Require-Bundle:
org.eclipse.search;bundle-version="[3.5.100,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
- org.junit;bundle-version="3.8.2",
+ org.junit;bundle-version="4.12.0",
org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",
org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ui.editors;bundle-version="[3.5.0,4.0.0)"
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/core/tests/AllSearchModelTests.java b/org.eclipse.search.tests/src/org/eclipse/search/core/tests/AllSearchModelTests.java
index 05c483be3..d0269f652 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/core/tests/AllSearchModelTests.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/core/tests/AllSearchModelTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -14,12 +14,12 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import junit.framework.TestSuite;
-
@RunWith(Suite.class)
-@SuiteClasses({QueryManagerTest.class,
- TestSearchResult.class,
- LineConversionTest.class})
-public class AllSearchModelTests extends TestSuite {
- //intentionally left empty
+@SuiteClasses({
+ QueryManagerTest.class,
+ TestSearchResult.class,
+ LineConversionTest.class
+})
+public class AllSearchModelTests {
+ // see @SuiteClasses
}
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/AllSearchTests.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/AllSearchTests.java
index 8c4ae7cca..44070c9b8 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/tests/AllSearchTests.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/AllSearchTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -18,9 +18,10 @@ import org.eclipse.search.core.tests.AllSearchModelTests;
import org.eclipse.search.tests.filesearch.AllFileSearchTests;
@RunWith(Suite.class)
-@SuiteClasses({AllFileSearchTests.class,
- AllSearchModelTests.class
+@SuiteClasses({
+ AllFileSearchTests.class,
+ AllSearchModelTests.class
})
public class AllSearchTests {
- //intentionally left blank
+ // see @SuiteClasses
}
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AllFileSearchTests.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AllFileSearchTests.java
index 3708c55ab..81c29d93e 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AllFileSearchTests.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AllFileSearchTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -10,46 +10,22 @@
*******************************************************************************/
package org.eclipse.search.tests.filesearch;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
+import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-
-import org.eclipse.search.tests.ResourceHelper;
-
@RunWith(Suite.class)
@SuiteClasses({
- AnnotationManagerTest.class,
- FileSearchTests.class,
- LineAnnotationManagerTest.class,
- PositionTrackerTest.class,
- ResultUpdaterTest.class,
- SearchResultPageTest.class,
- SortingTest.class
+ AnnotationManagerTest.class,
+ FileSearchTests.class,
+ LineAnnotationManagerTest.class,
+ PositionTrackerTest.class,
+ ResultUpdaterTest.class,
+ SearchResultPageTest.class,
+ SortingTest.class
})
public class AllFileSearchTests {
-
- public static final String STANDARD_PROJECT_NAME= "JUnitSource";
-
- private static IProject fProject;
-
- @BeforeClass
- public static void globalSetUp() throws Exception {
- IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(STANDARD_PROJECT_NAME);
- if (!project.exists()) { // allow nesting of JUnitSetups
- fProject= ResourceHelper.createJUnitSourceProject(STANDARD_PROJECT_NAME);
- }
- }
-
- @AfterClass
- public static void globalTearDown() throws Exception {
- if (fProject != null) { // delete only by the setup who created the project
- ResourceHelper.deleteProject(STANDARD_PROJECT_NAME);
- fProject= null;
- }
- }
+ @ClassRule
+ public static JUnitSourceSetup fgJUnitSource= new JUnitSourceSetup();
}
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AnnotationManagerTest.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AnnotationManagerTest.java
index 05143ed89..80881a326 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AnnotationManagerTest.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AnnotationManagerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -18,6 +18,7 @@ import java.util.Iterator;
import org.junit.After;
import org.junit.Before;
+import org.junit.ClassRule;
import org.junit.Test;
import org.eclipse.core.resources.IFile;
@@ -52,6 +53,9 @@ public class AnnotationManagerTest {
private AnnotationTypeLookup fAnnotationTypeLookup= EditorsUI.getAnnotationTypeLookup();
+ @ClassRule
+ public static JUnitSourceSetup fgJUnitSource= new JUnitSourceSetup();
+
@Before
public void setUp() {
SearchTestPlugin.ensureWelcomePageClosed();
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/FileCharSequenceTests.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/FileCharSequenceTests.java
index 21bb28c3d..2a8f62330 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/FileCharSequenceTests.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/FileCharSequenceTests.java
@@ -128,8 +128,8 @@ public class FileCharSequenceTests {
assertOutOfBound(desc + "access at length", actual, expected.length());
assertOutOfBound(desc + "access at -1", actual, -1);
-
- assertEquals(desc + " - length", actual.toString(), expected.toString());
+
+ Assert.assertEquals(desc + " - length", actual.toString(), expected.toString());
}
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/FileSearchTests.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/FileSearchTests.java
index 06384d2cb..8a8502390 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/FileSearchTests.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/FileSearchTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -20,6 +20,7 @@ import java.util.regex.Pattern;
import org.junit.After;
import org.junit.Before;
+import org.junit.ClassRule;
import org.junit.Test;
import org.eclipse.core.runtime.CoreException;
@@ -28,7 +29,6 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.ui.IWorkbenchPage;
@@ -110,6 +110,9 @@ public class FileSearchTests {
}
+ @ClassRule
+ public static JUnitSourceSetup fgJUnitSource= new JUnitSourceSetup();
+
private IProject fProject;
@Before
@@ -226,7 +229,7 @@ public class FileSearchTests {
private void testWildCards3(TestResultCollector collector) throws Exception {
- IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(AllFileSearchTests.STANDARD_PROJECT_NAME);
+ IProject project= fgJUnitSource.getStandardProject();
IFile openFile1= (IFile) project.findMember("junit/framework/TestCase.java");
IFile openFile2= (IFile) project.findMember("junit/extensions/ExceptionTestCase.java");
IFile openFile3= (IFile) project.findMember("junit/framework/Assert.java");
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/JUnitSourceSetup.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/JUnitSourceSetup.java
new file mode 100644
index 000000000..50849a889
--- /dev/null
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/JUnitSourceSetup.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.search.tests.filesearch;
+
+import org.junit.rules.ExternalResource;
+
+import org.eclipse.core.runtime.CoreException;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.search.tests.ResourceHelper;
+
+public class JUnitSourceSetup extends ExternalResource {
+
+ public static final String STANDARD_PROJECT_NAME= "JUnitSource";
+
+ private IProject fProject= null;
+ private final String fProjectName;
+
+ public IProject getStandardProject() {
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(STANDARD_PROJECT_NAME);
+ }
+
+ public JUnitSourceSetup() {
+ this(STANDARD_PROJECT_NAME);
+ }
+
+ public JUnitSourceSetup(String projectName) {
+ fProjectName= projectName;
+ }
+
+ @Override
+ public void before() throws Exception {
+ IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(fProjectName);
+ if (!project.exists()) { // allow nesting of JUnitSetups
+ fProject= ResourceHelper.createJUnitSourceProject(fProjectName);
+ }
+ }
+
+ @Override
+ public void after() /*throws Exception (but JUnit4 API is stupid...)*/ {
+ if (fProject != null) { // delete only by the setup who created the project
+ try {
+ ResourceHelper.deleteProject(fProjectName);
+ } catch (CoreException e) {
+ throw new AssertionError(e); // workaround stupid JUnit4 API
+ }
+ fProject= null;
+ }
+ }
+
+}
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/LineAnnotationManagerTest.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/LineAnnotationManagerTest.java
index b8a11aaf3..eb18d53f2 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/LineAnnotationManagerTest.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/LineAnnotationManagerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -10,13 +10,15 @@
*******************************************************************************/
package org.eclipse.search.tests.filesearch;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.Iterator;
import org.junit.After;
import org.junit.Before;
+import org.junit.ClassRule;
import org.junit.Test;
import org.eclipse.core.resources.IFile;
@@ -49,6 +51,9 @@ public class LineAnnotationManagerTest {
private LineBasedFileSearch fLineQuery;
private AnnotationTypeLookup fAnnotationTypeLookup= EditorsUI.getAnnotationTypeLookup();
+ @ClassRule
+ public static JUnitSourceSetup fgJUnitSource= new JUnitSourceSetup();
+
@Before
public void setUp() throws Exception {
EditorAnnotationManager.debugSetHighlighterType(EditorAnnotationManager.HIGHLIGHTER_ANNOTATION);
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/PositionTrackerTest.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/PositionTrackerTest.java
index 80275ca5a..961316115 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/PositionTrackerTest.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/PositionTrackerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -14,6 +14,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Before;
+import org.junit.ClassRule;
import org.junit.Test;
import org.eclipse.core.resources.IFile;
@@ -42,6 +43,9 @@ import org.eclipse.search2.internal.ui.InternalSearchUI;
public class PositionTrackerTest {
FileSearchQuery fQuery1;
+ @ClassRule
+ public static JUnitSourceSetup junitSource= new JUnitSourceSetup();
+
@Before
public void setUp() throws Exception {
String[] fileNamePatterns= { "*.java" };
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SearchResultPageTest.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SearchResultPageTest.java
index c75674625..7d401f10d 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SearchResultPageTest.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SearchResultPageTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -11,9 +11,11 @@
package org.eclipse.search.tests.filesearch;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import org.junit.Before;
+import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Test;
@@ -42,6 +44,9 @@ import org.eclipse.search.ui.text.Match;
public class SearchResultPageTest {
FileSearchQuery fQuery1;
+ @ClassRule
+ public static JUnitSourceSetup fgJUnitSource= new JUnitSourceSetup();
+
@Before
public void setUp() throws Exception {
SearchTestPlugin.ensureWelcomePageClosed();
@@ -78,7 +83,7 @@ public class SearchResultPageTest {
@Test
- @Ignore
+ @Ignore // checkElementDisplay(..) misses cases where one line contains multiple matches
public void testRemoveTreeMatches() throws Exception {
NewSearchUI.runQueryInForeground(null, fQuery1);
ISearchResultViewPart view= NewSearchUI.getSearchResultView();
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SortingTest.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SortingTest.java
index 402a97bef..2571535db 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SortingTest.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SortingTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -10,12 +10,14 @@
*******************************************************************************/
package org.eclipse.search.tests.filesearch;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.List;
import org.junit.Before;
+import org.junit.ClassRule;
import org.junit.Test;
import org.eclipse.search.internal.ui.text.FileSearchQuery;
@@ -27,6 +29,9 @@ import org.eclipse.search.ui.text.Match;
public class SortingTest {
FileSearchQuery fQuery1;
+ @ClassRule
+ public static JUnitSourceSetup fgJUnitSource= new JUnitSourceSetup();
+
@Before
public void setUp() throws Exception {
String[] fileNamePatterns= { "*.java" };
diff --git a/org.eclipse.text.tests/META-INF/MANIFEST.MF b/org.eclipse.text.tests/META-INF/MANIFEST.MF
index 2df2f20f1..c831a1886 100644
--- a/org.eclipse.text.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.text.tests/META-INF/MANIFEST.MF
@@ -13,7 +13,7 @@ Require-Bundle:
org.eclipse.core.commands;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.text;bundle-version="[3.5.0,4.0.0)",
- org.junit;bundle-version="3.8.2"
+ org.junit;bundle-version="4.12.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Eclipse-BundleShape: dir
Import-Package: com.ibm.icu.text,
diff --git a/org.eclipse.text.tests/projection/org/eclipse/text/tests/ProjectionTestSuite.java b/org.eclipse.text.tests/projection/org/eclipse/text/tests/ProjectionTestSuite.java
index 1106d0d46..8297a078f 100644
--- a/org.eclipse.text.tests/projection/org/eclipse/text/tests/ProjectionTestSuite.java
+++ b/org.eclipse.text.tests/projection/org/eclipse/text/tests/ProjectionTestSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -21,8 +21,10 @@ import org.junit.runners.Suite.SuiteClasses;
* @since 3.0
*/
@RunWith(Suite.class)
-@SuiteClasses({ProjectionDocumentTest.class,
- ProjectionMappingTest.class})
+@SuiteClasses({
+ ProjectionDocumentTest.class,
+ ProjectionMappingTest.class
+})
public class ProjectionTestSuite {
- //intentionally left blank
+ // see @SuiteClasses
}
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/EclipseTextTestSuite.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/EclipseTextTestSuite.java
index 0e64d4b41..2cc554131 100644
--- a/org.eclipse.text.tests/src/org/eclipse/text/tests/EclipseTextTestSuite.java
+++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/EclipseTextTestSuite.java
@@ -26,25 +26,25 @@ import org.eclipse.text.tests.templates.TemplatesTestSuite;
*/
@RunWith(Suite.class)
@SuiteClasses({
- LineTrackerTest4.class,
- DocumentExtensionTest.class,
- LineTrackerTest3.class,
- DocumentTest.class,
- FindReplaceDocumentAdapterTest.class,
- PositionUpdatingCornerCasesTest.class,
- ExclusivePositionUpdaterTest.class,
- TextEditTests.class,
- GapTextTest.class,
- GapTextStoreTest.class,
- ChildDocumentTest.class,
- ProjectionTestSuite.class,
- LinkTestSuite.class,
- CopyOnWriteTextStoreTest.class,
- TextUtilitiesTest.class,
- AnnotationModelStressTest.class,
- AnnotationModelExtension2Test.class,
- TemplatesTestSuite.class
+ LineTrackerTest4.class,
+ DocumentExtensionTest.class,
+ LineTrackerTest3.class,
+ DocumentTest.class,
+ FindReplaceDocumentAdapterTest.class,
+ PositionUpdatingCornerCasesTest.class,
+ ExclusivePositionUpdaterTest.class,
+ TextEditTests.class,
+ GapTextTest.class,
+ GapTextStoreTest.class,
+ ChildDocumentTest.class,
+ ProjectionTestSuite.class,
+ LinkTestSuite.class,
+ CopyOnWriteTextStoreTest.class,
+ TextUtilitiesTest.class,
+ AnnotationModelStressTest.class,
+ AnnotationModelExtension2Test.class,
+ TemplatesTestSuite.class
})
public class EclipseTextTestSuite {
- //intentionally left blank
+ // see @SuiteClasses
}
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/link/LinkTestSuite.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/link/LinkTestSuite.java
index 8aaeb10c5..f7dd208e7 100644
--- a/org.eclipse.text.tests/src/org/eclipse/text/tests/link/LinkTestSuite.java
+++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/link/LinkTestSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -22,10 +22,12 @@ import org.junit.runners.Suite.SuiteClasses;
* @since 3.0
*/
@RunWith(Suite.class)
-@SuiteClasses({LinkedPositionGroupTest.class,
- LinkedPositionTest.class,
- InclusivePositionUpdaterTest.class,
- LinkedModeModelTest.class})
+@SuiteClasses({
+ LinkedPositionGroupTest.class,
+ LinkedPositionTest.class,
+ InclusivePositionUpdaterTest.class,
+ LinkedModeModelTest.class
+})
public class LinkTestSuite {
- //intentionally left blank
+ // see @SuiteClasses
}
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/templates/TemplatesTestSuite.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/templates/TemplatesTestSuite.java
index 422bf62be..ca4a04626 100755
--- a/org.eclipse.text.tests/src/org/eclipse/text/tests/templates/TemplatesTestSuite.java
+++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/templates/TemplatesTestSuite.java
@@ -23,9 +23,10 @@ import org.junit.runners.Suite.SuiteClasses;
*/
@RunWith(Suite.class)
@SuiteClasses({
- TemplateTranslatorTest.class,
- TemplateVariablesWordSelectionTest.class,
- GlobalTemplateVariablesDateTest.class})
+ TemplateTranslatorTest.class,
+ TemplateVariablesWordSelectionTest.class,
+ GlobalTemplateVariablesDateTest.class
+})
public class TemplatesTestSuite {
- // intentionally empty
+ // see @SuiteClasses
}
diff --git a/org.eclipse.ui.editors.tests/META-INF/MANIFEST.MF b/org.eclipse.ui.editors.tests/META-INF/MANIFEST.MF
index c576df312..0b0b08358 100644
--- a/org.eclipse.ui.editors.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.editors.tests/META-INF/MANIFEST.MF
@@ -8,7 +8,7 @@ Bundle-Localization: plugin
Export-Package: org.eclipse.ui.editors.tests
Require-Bundle:
org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
- org.junit;bundle-version="3.8.2",
+ org.junit;bundle-version="4.12.0",
org.eclipse.jface;bundle-version="[3.5.0,4.0.0)",
org.eclipse.text;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",
@@ -18,7 +18,7 @@ Require-Bundle:
org.eclipse.core.filebuffers.tests;bundle-version="[3.4.100,4.0.0)",
org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
org.eclipse.text.tests;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.test.performance;bundle-version="[3.12.0,4.0.0)
+ org.eclipse.test.performance;bundle-version="[3.12.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Eclipse-BundleShape: dir
Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.ui.editors.tests/src/org/eclipse/ui/editors/tests/EditorsTestSuite.java b/org.eclipse.ui.editors.tests/src/org/eclipse/ui/editors/tests/EditorsTestSuite.java
index 7cac5a428..d552f89d8 100644
--- a/org.eclipse.ui.editors.tests/src/org/eclipse/ui/editors/tests/EditorsTestSuite.java
+++ b/org.eclipse.ui.editors.tests/src/org/eclipse/ui/editors/tests/EditorsTestSuite.java
@@ -22,13 +22,13 @@ import org.junit.runners.Suite.SuiteClasses;
*/
@RunWith(Suite.class)
@SuiteClasses({
- ChainedPreferenceStoreTest.class,
- EncodingChangeTests.class,
- GotoLineTest.class,
- SegmentedModeTest.class,
- MarkerAnnotationOrderTest.class,
- ZoomTest.class
+ ChainedPreferenceStoreTest.class,
+ EncodingChangeTests.class,
+ GotoLineTest.class,
+ SegmentedModeTest.class,
+ MarkerAnnotationOrderTest.class,
+ ZoomTest.class
})
public class EditorsTestSuite {
- //intentionally left blank
+ // see @SuiteClasses
}
diff --git a/org.eclipse.ui.workbench.texteditor.tests/META-INF/MANIFEST.MF b/org.eclipse.ui.workbench.texteditor.tests/META-INF/MANIFEST.MF
index 7127792b3..4309663bc 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.workbench.texteditor.tests/META-INF/MANIFEST.MF
@@ -14,7 +14,7 @@ Require-Bundle:
org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.junit;bundle-version="3.8.2",
+ org.junit;bundle-version="4.12.0",
org.eclipse.text.tests;bundle-version="[3.5.0,4.0.0)",
org.eclipse.test.performance;bundle-version="[3.9.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
index 4100efeb9..ec025247e 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -10,12 +10,19 @@
*******************************************************************************/
package org.eclipse.ui.workbench.texteditor.tests;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import java.util.ResourceBundle;
-import org.junit.Before;
+import org.junit.After;
+import org.junit.FixMethodOrder;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.TestName;
+import org.junit.runners.MethodSorters;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
@@ -39,8 +46,12 @@ import org.eclipse.ui.PlatformUI;
*
* @since 3.1
*/
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class FindReplaceDialogTest {
+ @Rule
+ public TestName testName = new TestName();
+
private Accessor fFindReplaceDialog;
private TextViewer fTextViewer;
@@ -53,6 +64,7 @@ public class FindReplaceDialogTest {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
+ // do nothing
}
}
}
@@ -80,7 +92,7 @@ public class FindReplaceDialogTest {
fFindReplaceDialog= new Accessor(fFindReplaceDialogStubAccessor.invoke("getDialog", null), "org.eclipse.ui.texteditor.FindReplaceDialog", getClass().getClassLoader());
}
- @Before
+ @After
public void tearDown() throws Exception {
if (fFindReplaceDialog != null) {
fFindReplaceDialog.invoke("close", null);
@@ -94,7 +106,7 @@ public class FindReplaceDialogTest {
}
@Test
- public void testInitialButtonState() {
+ public void test01InitialButtonState() {
openFindReplaceDialog();
Boolean value;
@@ -209,7 +221,7 @@ public class FindReplaceDialogTest {
}
private String takeScreenshot() {
- return ScreenshotTest.takeScreenshot(FindReplaceDialogTest.class, FindReplaceDialogTest.class.getSimpleName(), System.out);
+ return ScreenshotTest.takeScreenshot(FindReplaceDialogTest.class, testName.getMethodName(), System.out);
}
@Test
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
index 2ad7fef91..1e8a2bb34 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
@@ -13,7 +13,9 @@ package org.eclipse.ui.workbench.texteditor.tests;
import java.io.File;
import java.io.PrintStream;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.TestName;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.GC;
@@ -34,9 +36,12 @@ import org.eclipse.ui.PlatformUI;
public class ScreenshotTest {
+ @Rule
+ public TestName testName = new TestName();
+
@Test
public void testScreenshot() throws Exception {
- takeScreenshot(ScreenshotTest.class, ScreenshotTest.class.getSimpleName(), System.out);
+ takeScreenshot(ScreenshotTest.class, testName.getMethodName(), System.out);
}
@Test
@@ -65,7 +70,7 @@ public class ScreenshotTest {
System.out.println("* CTRL up " + display.post(event));
runEventQueue();
- takeScreenshot(ScreenshotTest.class, ScreenshotTest.class.getSimpleName() + 2, System.out);
+ takeScreenshot(ScreenshotTest.class, testName.getMethodName() + 2, System.out);
event.type= SWT.KeyDown;
event.character= SWT.ESC;
@@ -75,7 +80,7 @@ public class ScreenshotTest {
System.out.println("* ESC up " + display.post(event));
runEventQueue();
- takeScreenshot(ScreenshotTest.class, ScreenshotTest.class.getSimpleName() + 3, System.out);
+ takeScreenshot(ScreenshotTest.class, testName.getMethodName() + 3, System.out);
}
/**
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/WorkbenchTextEditorTestSuite.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/WorkbenchTextEditorTestSuite.java
index 30cf0893c..ec8d26677 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/WorkbenchTextEditorTestSuite.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/WorkbenchTextEditorTestSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -27,14 +27,14 @@ import org.eclipse.ui.workbench.texteditor.tests.rulers.RulerTestSuite;
*/
@RunWith(Suite.class)
@SuiteClasses({
- FindReplaceDialogTest.class,
- HippieCompletionTest.class,
- RangeTest.class,
- ChangeRegionTest.class,
- RulerTestSuite.class,
- HunkComputerTest.class,
- ScreenshotTest.class
+ FindReplaceDialogTest.class,
+ HippieCompletionTest.class,
+ RangeTest.class,
+ ChangeRegionTest.class,
+ RulerTestSuite.class,
+ HunkComputerTest.class,
+ ScreenshotTest.class
})
public class WorkbenchTextEditorTestSuite {
- //intentionally left blank
+ // see @SuiteClasses
}
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/rulers/RulerTestSuite.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/rulers/RulerTestSuite.java
index 8c5fc0d7f..c558bd545 100755
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/rulers/RulerTestSuite.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/rulers/RulerTestSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* 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
@@ -19,7 +19,9 @@ import org.junit.runners.Suite.SuiteClasses;
* @since 3.0
*/
@RunWith(Suite.class)
-@SuiteClasses(DAGTest.class)
+@SuiteClasses({
+ DAGTest.class
+})
public class RulerTestSuite {
- //intentionally left blank
+ // see @SuiteClasses
}

Back to the top