diff options
author | Sven Gothel <[email protected]> | 2014-05-13 16:33:16 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-05-13 16:33:16 +0200 |
commit | 1a504fa682e6f28c5543da4d5885c7f2ff4ed3f1 (patch) | |
tree | d77babc1da8c7d693820d9da172546be276c90a8 /src/junit/com/jogamp | |
parent | 64615f17a8c63f692159235e169dbdd14d30b737 (diff) |
Bump semver.jar to 731db3566b4096ecf6a08a9d33991400e66c5021 (sgothel/jogamp branch): Using direct regexp for excludes
Diffstat (limited to 'src/junit/com/jogamp')
-rw-r--r-- | src/junit/com/jogamp/common/util/TestVersionSemantics.java | 3 | ||||
-rw-r--r-- | src/junit/com/jogamp/junit/util/VersionSemanticsUtil.java | 14 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/junit/com/jogamp/common/util/TestVersionSemantics.java b/src/junit/com/jogamp/common/util/TestVersionSemantics.java index dba42b5..6a7b93a 100644 --- a/src/junit/com/jogamp/common/util/TestVersionSemantics.java +++ b/src/junit/com/jogamp/common/util/TestVersionSemantics.java @@ -78,8 +78,7 @@ public class TestVersionSemantics extends JunitTracer { static final Set<String> excludes; static { excludes = new HashSet<String>(); - excludes.add("jogamp.common.**"); - excludes.add("jogamp.android.**"); + excludes.add("^\\Qjogamp/\\E.*$"); } @Test diff --git a/src/junit/com/jogamp/junit/util/VersionSemanticsUtil.java b/src/junit/com/jogamp/junit/util/VersionSemanticsUtil.java index dd5dcd0..2c1aaf5 100644 --- a/src/junit/com/jogamp/junit/util/VersionSemanticsUtil.java +++ b/src/junit/com/jogamp/junit/util/VersionSemanticsUtil.java @@ -39,8 +39,8 @@ import org.junit.Assert; import org.osjava.jardiff.DiffCriteria; import org.semver.Comparer; import org.semver.Delta; -import org.semver.Dumper; import org.semver.Delta.Difference; +import org.semver.Dumper; import com.jogamp.common.util.IOUtil; import com.jogamp.common.util.JarUtil; @@ -52,7 +52,7 @@ public class VersionSemanticsUtil { final Delta.CompatibilityType expectedCompatibilityType, final File previousJar, final VersionNumberString preVersionNumber, final Class<?> currentJarClazz, final ClassLoader currentJarCL, final VersionNumberString curVersionNumber, - final Set<String> excludes) + final Set<String> excludesRegExp) throws IllegalArgumentException, IOException, URISyntaxException { // Get containing JAR file "TestJarsInJar.jar" and add it to the TempJarCache @@ -62,19 +62,19 @@ public class VersionSemanticsUtil { testVersion(diffCriteria, expectedCompatibilityType, previousJar, preVersionNumber, currentJar, curVersionNumber, - excludes); + excludesRegExp); } public static void testVersion(final DiffCriteria diffCriteria, final Delta.CompatibilityType expectedCompatibilityType, final File previousJar, final VersionNumberString preVersionNumber, final File currentJar, final VersionNumberString curVersionNumber, - final Set<String> excludes) + final Set<String> excludesRegExp) throws IllegalArgumentException, IOException, URISyntaxException { - final Set<String> includes = new HashSet<String>(); + final Set<String> includesRegExp = new HashSet<String>(); - final Comparer comparer = new Comparer(diffCriteria, previousJar, currentJar, includes, excludes); + final Comparer comparer = new Comparer(diffCriteria, previousJar, currentJar, includesRegExp, true, excludesRegExp, true); final Delta delta = comparer.diff(); //Validates that computed and provided compatibility type are compatible. @@ -111,7 +111,7 @@ public class VersionSemanticsUtil { final Difference diff = iter.next(); System.err.printf("Diff %4d: %-11s in class %s%n", diffI, diff.getClass().getSimpleName(), diff.getClassName()); } - Dumper.dump(delta); + Dumper.dump(delta, System.err); Assert.assertTrue(resS, compOK); |