From f9a6d3838b6ef200ba97f694809f4906a8536de0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 20 Sep 2014 07:24:06 +0200 Subject: TestVersionSemanticsNOUI: Enable test V220->V221 and V221->V222 (w/ 2 extra exclusions) Enable tests: - V220->V221 - V221->V222 (w/ 2 extra exclusions) - GLRendererQuirks COUNT has been increased (-> use a method, FIXME) - Animator pauseIssued is volatile now --- .../junit/jogl/acore/TestVersionSemanticsNOUI.java | 38 ++++++++++++++-------- 1 file changed, 25 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestVersionSemanticsNOUI.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestVersionSemanticsNOUI.java index 1d70899df..7ae07f41b 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestVersionSemanticsNOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestVersionSemanticsNOUI.java @@ -48,9 +48,6 @@ import com.jogamp.opengl.JoglVersion; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestVersionSemanticsNOUI extends JunitTracer { static final String jarFile = "jogl-all.jar"; - static final VersionNumberString preVersionNumber = new VersionNumberString("2.2.0"); - // static final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.NON_BACKWARD_COMPATIBLE; - static final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER; static final DiffCriteria diffCriteria = new org.osjava.jardiff.SimpleDiffCriteria(); // static final DiffCriteria diffCriteria = new org.osjava.jardiff.PublicDiffCriteria(); @@ -58,35 +55,46 @@ public class TestVersionSemanticsNOUI extends JunitTracer { static final JogampVersion curVersion = JoglVersion.getInstance(); static final VersionNumberString curVersionNumber = new VersionNumberString(curVersion.getImplementationVersion()); - static final Set excludes; + static final Set excludesDefault, excludeV221toV222; static { - excludes = new HashSet(); - excludes.add("^\\Qjogamp/\\E.*$"); + excludesDefault = new HashSet(); + excludesDefault.add("^\\Qjogamp/\\E.*$"); + + excludeV221toV222 = new HashSet(); + excludeV221toV222.add("^\\Qjogamp/\\E.*$"); + excludeV221toV222.add("^\\Qcom/jogamp/opengl/GLRendererQuirks\\E$"); // COUNT increased by one + excludeV221toV222.add("^\\Qcom/jogamp/opengl/util/Animator\\E$"); // pauseIssued -> volatile } // @Test public void testVersionV212V213() throws IllegalArgumentException, IOException, URISyntaxException { - testVersions(diffCriteria, Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER, "2.1.2", "2.1.3"); + testVersions(diffCriteria, Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER, "2.1.2", "2.1.3", excludesDefault); } // @Test public void testVersionV213V214() throws IllegalArgumentException, IOException, URISyntaxException { - testVersions(diffCriteria, Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER, "2.1.3", "2.1.4"); + testVersions(diffCriteria, Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER, "2.1.3", "2.1.4", excludesDefault); } // @Test public void testVersionV214V215() throws IllegalArgumentException, IOException, URISyntaxException { - testVersions(diffCriteria, Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER, "2.1.4", "2.1.5"); + testVersions(diffCriteria, Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER, "2.1.4", "2.1.5", excludesDefault); } // @Test public void testVersionV215V220() throws IllegalArgumentException, IOException, URISyntaxException { - testVersions(diffCriteria, Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER, "2.1.5", "2.2.0"); + testVersions(diffCriteria, Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER, "2.1.5", "2.2.0", excludesDefault); + } + + @Test + public void testVersionV220V221() throws IllegalArgumentException, IOException, URISyntaxException { + testVersions(diffCriteria, Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER, "2.2.0", "2.2.1", excludesDefault); } void testVersions(final DiffCriteria diffCriteria, final Delta.CompatibilityType expectedCompatibilityType, - final String v1, final String v2) throws IllegalArgumentException, IOException, URISyntaxException { + final String v1, final String v2, final Set excludes) + throws IllegalArgumentException, IOException, URISyntaxException { final VersionNumberString preVersionNumber = new VersionNumberString(v1); final File previousJar = new File("lib/v"+v1+"/"+jarFile); @@ -100,7 +108,11 @@ public class TestVersionSemanticsNOUI extends JunitTracer { } @Test - public void testVersionLatest() throws IllegalArgumentException, IOException, URISyntaxException { + public void testVersionV221V222() throws IllegalArgumentException, IOException, URISyntaxException { + // static final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.NON_BACKWARD_COMPATIBLE; + final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER; + + final VersionNumberString preVersionNumber = new VersionNumberString("2.2.1"); final File previousJar = new File("lib/v"+preVersionNumber.getVersionString()+"/"+jarFile); final ClassLoader currentCL = TestVersionSemanticsNOUI.class.getClassLoader(); @@ -108,7 +120,7 @@ public class TestVersionSemanticsNOUI extends JunitTracer { VersionSemanticsUtil.testVersion(diffCriteria, expectedCompatibilityType, previousJar, preVersionNumber, curVersion.getClass(), currentCL, curVersionNumber, - excludes); + excludeV221toV222); } public static void main(final String args[]) throws IOException { -- cgit v1.2.3