Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/org.eclipse.search.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ Require-Bundle:
org.eclipse.search;bundle-version="[3.16.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.29.100,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.19.200,4.0.0)",
org.junit;bundle-version="4.13.0",
org.eclipse.ui.workbench.texteditor;bundle-version="[3.17.200,4.0.0)",
org.eclipse.jface.text;bundle-version="[3.24.200,4.0.0)",
org.eclipse.ui.editors;bundle-version="[3.17.100,4.0.0)",
org.eclipse.ltk.core.refactoring;bundle-version="[3.14.100,4.0.0)"
org.eclipse.ltk.core.refactoring;bundle-version="[3.14.100,4.0.0)",
org.junit;bundle-version="4.13.2"
Import-Package: org.junit.jupiter.api;version="[5.14.0,6.0.0)",
org.junit.jupiter.api.function;version="[5.14.0,6.0.0)",
org.junit.platform.suite.api;version="[1.14.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*******************************************************************************/
package org.eclipse.search.core.tests;

import org.junit.platform.suite.api.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

@Suite
@SelectClasses({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@

package org.eclipse.search.core.tests;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

import java.io.ByteArrayInputStream;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
Expand Down Expand Up @@ -49,7 +50,7 @@ public class LineConversionTest {

private static final String LINE_THREE= "This is the third line";

@Before
@BeforeEach
public void setUp() throws Exception {
IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject("Test");
project.create(null);
Expand All @@ -58,7 +59,7 @@ public void setUp() throws Exception {
fFile.create(new ByteArrayInputStream(getFileContents().getBytes()), true, null);
}

@After
@AfterEach
public void tearDown() throws Exception {
SearchPlugin.getActivePage().closeAllEditors(false);
fFile.getProject().delete(true, true, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@

import org.eclipse.jface.resource.ImageDescriptor;

import org.eclipse.search.internal.ui.text.FileSearchResult;
import org.eclipse.search.ui.ISearchQuery;
import org.eclipse.search.ui.text.IEditorMatchAdapter;
import org.eclipse.search.ui.text.IFileMatchAdapter;

import org.eclipse.search.internal.ui.text.FileSearchResult;

public class NullSearchResult extends FileSearchResult { // inherit from FileSearchResult so a search result view can be found

private final NullQuery fNullQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
*******************************************************************************/
package org.eclipse.search.core.tests;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.Test;

import org.eclipse.search.ui.IQueryListener;
import org.eclipse.search.ui.ISearchQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
package org.eclipse.search.core.tests;


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.Test;

import org.eclipse.search.ui.ISearchQuery;
import org.eclipse.search.ui.text.AbstractTextSearchResult;
Expand Down Expand Up @@ -60,9 +62,9 @@ public void testAddMatchDifferentStart() {
Match match3= new Match(object, 0, 2);
result.addMatch(match3);
Match[] matches= result.getMatches(object);
assertSame("matches[0]", matches[0], match3);
assertSame("matches[1]", matches[1], match2);
assertSame("matches[2]", matches[2], match1);
assertSame(matches[0], match3, "matches[0]");
assertSame(matches[1], match2, "matches[1]");
assertSame(matches[2], match1, "matches[2]");
}

@Test
Expand All @@ -80,9 +82,9 @@ public void testAddMatchDifferentStartInOrder() {
Match match3= new Match(object, 2, 2);
result.addMatch(match3);
Match[] matches= result.getMatches(object);
assertSame("matches[0]", matches[0], match1);
assertSame("matches[1]", matches[1], match2);
assertSame("matches[2]", matches[2], match3);
assertSame(matches[0], match1, "matches[0]");
assertSame(matches[1], match2, "matches[1]");
assertSame(matches[2], match3, "matches[2]");
}

@Test
Expand All @@ -98,8 +100,8 @@ public void testAddMatchDifferentLength() {
Match match2= new Match(object, 1, 0);
result.addMatch(match2);
Match[] matches= result.getMatches(object);
assertSame("matches[0]", matches[0], match2);
assertSame("matches[1]", matches[1], match1);
assertSame(matches[0], match2, "matches[0]");
assertSame(matches[1], match1, "matches[1]");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*******************************************************************************/
package org.eclipse.search.tests;

import org.junit.platform.suite.api.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

import org.eclipse.search.core.tests.AllSearchModelTests;
import org.eclipse.search.tests.filesearch.AllFileSearchTests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@

import java.util.regex.Pattern;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;

import org.eclipse.core.resources.IFile;

import org.eclipse.search.core.text.TextSearchEngine;
import org.eclipse.search.core.text.TextSearchRequestor;
import org.eclipse.search.core.text.TextSearchScope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
*******************************************************************************/
package org.eclipse.search.tests;

import static org.junit.Assert.assertTrue;

import static org.junit.jupiter.api.Assertions.assertTrue;

import java.util.Arrays;

import org.junit.jupiter.api.Test;

import org.eclipse.search.internal.core.text.TextSearchEngineRegistry;
import org.eclipse.search.internal.ui.SearchPlugin;
import org.junit.Test;

public class TextSearchRegistryTest {

Expand Down
Loading