aboutsummaryrefslogtreecommitdiffstats
path: root/testing-util
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2021-04-25 21:43:22 -0700
committerGitHub <noreply@github.com>2021-04-25 21:43:22 -0700
commit48e1b14cb46f389ed7cb78312d8c8ab61f1fba05 (patch)
tree01635f34664ae1ce1baa7de112288ec0a6c5116a /testing-util
parent32b2585c55ba8dbc5e1ee5fa522e7074f76040fb (diff)
parent18f3385e23b13b385edcbcc81dbb52623607dd8f (diff)
downloadaspectj-48e1b14cb46f389ed7cb78312d8c8ab61f1fba05.tar.gz
aspectj-48e1b14cb46f389ed7cb78312d8c8ab61f1fba05.zip
Merge pull request #41 from kriegaex/libs-refactoring
Libs refactoring (remove libs from Git SCM)
Diffstat (limited to 'testing-util')
-rw-r--r--testing-util/pom.xml17
-rw-r--r--testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java13
2 files changed, 10 insertions, 20 deletions
diff --git a/testing-util/pom.xml b/testing-util/pom.xml
index 8e5262fd6..384852893 100644
--- a/testing-util/pom.xml
+++ b/testing-util/pom.xml
@@ -10,17 +10,8 @@
</parent>
<artifactId>testing-util</artifactId>
- <packaging>jar</packaging>
- <name>testing-util</name>
<dependencies>
-<!--
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>asm</artifactId>
- <version>${project.version}</version>
- </dependency>
--->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>util</artifactId>
@@ -34,14 +25,14 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.13</version>
+ <!-- Yes, not 'test' here -->
+ <scope>compile</scope>
</dependency>
<dependency>
+ <!-- Identical to lib/jdiff/jdiff.jar, a former system-scoped dependency. Now to be found on GitHub Packages. -->
<groupId>jdiff</groupId>
<artifactId>jdiff</artifactId>
- <version>1.0</version>
- <scope>system</scope>
- <systemPath>${project.basedir}/../lib/jdiff/jdiff.jar</systemPath>
+ <version>1.3</version>
</dependency>
</dependencies>
diff --git a/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java b/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java
index 508f71550..79ae9a776 100644
--- a/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java
+++ b/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java
@@ -40,13 +40,12 @@ import org.aspectj.util.Reflection;
import jdiff.text.FileLine;
import jdiff.util.Diff;
import jdiff.util.DiffNormalOutput;
-import junit.framework.Assert;
+import org.junit.Assert;
import junit.framework.AssertionFailedError;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestResult;
import junit.framework.TestSuite;
-import sun.net.www.ParseUtil;
/**
* Things that junit should perhaps have, but doesn't. Note the file-comparison methods require JDiff to run, but JDiff types are
@@ -163,7 +162,7 @@ public final class TestUtil {
public static URL fileToURL(File file) {
try {
- return file.toURL();
+ return file.toURI().toURL();
} catch (MalformedURLException e) {
return null;
}
@@ -303,7 +302,7 @@ public final class TestUtil {
public static URL libURL(String rpath) {
File file = libFile(rpath);
try {
- return file.toURL();
+ return file.toURI().toURL();
} catch (MalformedURLException e) {
throw new IllegalArgumentException("bad URL from: " + file);
}
@@ -399,7 +398,7 @@ public final class TestUtil {
// use the non-canonicalized filename
}
try {
- urls[count++] = ParseUtil.fileToEncodedURL(f);
+ urls[count++] = f.toURI().toURL();
} catch (IOException x) { }
}
@@ -412,8 +411,8 @@ public final class TestUtil {
}
/**
- * Checks that two multi-line strings have the same value. Each line is trimmed before comparision Produces an error on the
- * particular line of conflict
+ * Checks that two multi-line strings have the same value. Each line is trimmed before comparison.
+ * Produces an error on the particular line of conflict.
*/
public static void assertMultiLineStringEquals(String message, String s1, String s2) {
try {