From b142c7130c05c9c0ae97841b4ff626f528c45438 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 27 Mar 2015 15:58:50 +0100 Subject: TestVersionSemanticsNOUI: Add version tests: v221 -> v230 and v230 -> v23x (*) (*) Version v230 -> v23x Violates the semantic versioning spec a bit, i.e. minor API change within 'com/jogamp/opengl/util/stereo/' ! 2/ 11: com.jogamp.opengl.util.stereo.StereoDevice.Config : Remove 1, Change 0, Deprecate 0, Add 0 4/ 11: com.jogamp.opengl.util.stereo.StereoDeviceFactory : Remove 1, Change 0, Deprecate 0, Add 4 6/ 11: com.jogamp.opengl.util.stereo.StereoDeviceRenderer : Remove 1, Change 0, Deprecate 0, Add 1 Class com.jogamp.opengl.util.stereo.StereoDevice.Config Removed Class , access public super synchronized Class com.jogamp.opengl.util.stereo.StereoDeviceFactory Removed Method createDevice, desc (ILcom/jogamp/opengl/util/stereo/StereoDevice$Config;Z)Lcom/jogamp/opengl/util/stereo/StereoDevice;, access abstract public Class com.jogamp.opengl.util.stereo.StereoDeviceRenderer Removed Method getSingleSurfaceSize, desc ()Lcom/jogamp/nativewindow/util/DimensionImmutable;, access abstract public --- .../junit/jogl/acore/TestVersionSemanticsNOUI.java | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 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 5cf9655f8..bd1da8357 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 @@ -56,9 +56,12 @@ public class TestVersionSemanticsNOUI extends SingletonJunitCase { static final VersionNumberString curVersionNumber = new VersionNumberString(curVersion.getImplementationVersion()); static final Set excludesDefault; + static final Set excludesV230V23X; static { excludesDefault = new HashSet(); excludesDefault.add("^\\Qjogamp/\\E.*$"); + excludesV230V23X = new HashSet(excludesDefault); + excludesV230V23X.add("^\\Qcom/jogamp/opengl/util/stereo/\\E.*$"); } @@ -87,6 +90,11 @@ public class TestVersionSemanticsNOUI extends SingletonJunitCase { testVersions(diffCriteria, Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER, "2.2.0", "2.2.1", excludesDefault); } + @Test + public void testVersionV221V230() throws IllegalArgumentException, IOException, URISyntaxException { + testVersions(diffCriteria, Delta.CompatibilityType.NON_BACKWARD_COMPATIBLE, "2.2.1", "2.3.0", excludesDefault); + } + void testVersions(final DiffCriteria diffCriteria, final Delta.CompatibilityType expectedCompatibilityType, final String v1, final String v2, final Set excludes) throws IllegalArgumentException, IOException, URISyntaxException { @@ -103,11 +111,11 @@ public class TestVersionSemanticsNOUI extends SingletonJunitCase { } @Test - public void testVersionV221V23x() throws IllegalArgumentException, IOException, URISyntaxException { + public void testVersionV230V23x_00std() throws IllegalArgumentException, IOException, URISyntaxException { 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 VersionNumberString preVersionNumber = new VersionNumberString("2.3.0"); final File previousJar = new File("lib/v"+preVersionNumber.getVersionString()+"/"+jarFile); final ClassLoader currentCL = TestVersionSemanticsNOUI.class.getClassLoader(); @@ -117,6 +125,21 @@ public class TestVersionSemanticsNOUI extends SingletonJunitCase { curVersion.getClass(), currentCL, curVersionNumber, excludesDefault); } + @Test + public void testVersionV230V23x_01patch() throws IllegalArgumentException, IOException, URISyntaxException { + // final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.NON_BACKWARD_COMPATIBLE; + final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER; + + final VersionNumberString preVersionNumber = new VersionNumberString("2.3.0"); + final File previousJar = new File("lib/v"+preVersionNumber.getVersionString()+"/"+jarFile); + + final ClassLoader currentCL = TestVersionSemanticsNOUI.class.getClassLoader(); + + VersionSemanticsUtil.testVersion(diffCriteria, expectedCompatibilityType, + previousJar, preVersionNumber, + curVersion.getClass(), currentCL, curVersionNumber, + excludesV230V23X); + } public static void main(final String args[]) throws IOException { final String tstname = TestVersionSemanticsNOUI.class.getName(); -- cgit v1.2.3