Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2019-12-12 15:31:03 +0000
committerThomas Watson2019-12-12 15:31:03 +0000
commit7a0da0439d2ef8ded30b78ebce776c9a503dd547 (patch)
tree3af99ff95be026ad8560861a60124a736b06ccb4
parente77df4b0885d3b5d26ccd33ccc0aa9358586223d (diff)
downloadrt.equinox.framework-I20191213-0155.tar.gz
rt.equinox.framework-I20191213-0155.tar.xz
rt.equinox.framework-I20191213-0155.zip
Add test to ensure FrameworkUtil always uses Equinox FilterImplI20191215-1800I20191214-1800I20191213-1805I20191213-0155I20191212-1800
Change-Id: I9e37414c60d7f36dd339fb1819f819b3678226ba Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FrameworkUtilFilterTests.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FrameworkUtilFilterTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FrameworkUtilFilterTests.java
index 2e6be3709..ef8818b7b 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FrameworkUtilFilterTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FrameworkUtilFilterTests.java
@@ -15,7 +15,10 @@ package org.eclipse.osgi.tests.filter;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.osgi.framework.*;
+import org.eclipse.osgi.tests.OSGiTestsActivator;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
public class FrameworkUtilFilterTests extends FilterTests {
public static Test suite() {
@@ -26,4 +29,12 @@ public class FrameworkUtilFilterTests extends FilterTests {
public Filter createFilter(String filterString) throws InvalidSyntaxException {
return FrameworkUtil.createFilter(filterString);
}
+
+ // Equinox specific test to make sure we continue to use the Equinox FilterImpl
+ // from the FrameworkUtil createFilter method
+ public void testFrameworkUtilCreateFilter() throws InvalidSyntaxException {
+ Filter bundleContextFilter = OSGiTestsActivator.getContext().createFilter("(simplefilter=true)");
+ Filter frameworkUtilFilter = FrameworkUtil.createFilter("(simplefilter=true)");
+ assertTrue("Wrong Fitler impl type: " + frameworkUtilFilter.getClass().getName(), bundleContextFilter.getClass().equals(frameworkUtilFilter.getClass()));
+ }
}

Back to the top