summaryrefslogtreecommitdiffstats
path: root/testing-util
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-10-31 19:31:22 +0000
committerwisberg <wisberg>2003-10-31 19:31:22 +0000
commitdd5ef5ce8c31ef643d2f1a40a0cfcf46e32ca6e4 (patch)
tree46d12745237ab6cfa48b7af5be91ab41b57431ce /testing-util
parent458b26fe1241d3457ff8161ac8d18daa700a6cb0 (diff)
downloadaspectj-dd5ef5ce8c31ef643d2f1a40a0cfcf46e32ca6e4.tar.gz
aspectj-dd5ef5ce8c31ef643d2f1a40a0cfcf46e32ca6e4.zip
using ../{module}/ convention for testdata references so tests can be run from any peer directory/module, i.e., from one module
Diffstat (limited to 'testing-util')
-rw-r--r--testing-util/testsrc/org/aspectj/testing/util/TestUtilTest.java7
-rw-r--r--testing-util/testsrc/org/aspectj/testing/util/UtilTests.java1
2 files changed, 5 insertions, 3 deletions
diff --git a/testing-util/testsrc/org/aspectj/testing/util/TestUtilTest.java b/testing-util/testsrc/org/aspectj/testing/util/TestUtilTest.java
index e884fb143..11a68d5c4 100644
--- a/testing-util/testsrc/org/aspectj/testing/util/TestUtilTest.java
+++ b/testing-util/testsrc/org/aspectj/testing/util/TestUtilTest.java
@@ -15,6 +15,7 @@ package org.aspectj.testing.util;
import org.aspectj.bridge.MessageHandler;
import org.aspectj.bridge.MessageUtil;
+import org.aspectj.util.*;
import org.aspectj.util.FileUtil;
import java.io.File;
@@ -33,7 +34,7 @@ public class TestUtilTest extends TestCase {
public void testFileCompareNonClass() throws IOException {
MessageHandler holder = new MessageHandler();
- File thisFile = new File("testsrc/org/aspectj/testing/util/TestUtilTest.java");
+ File thisFile = new File(UtilTests.TESTING_UTIL_PATH + "/testsrc/org/aspectj/testing/util/TestUtilTest.java");
//File thisFile = new File("src/testing-util.lst");
assertTrue(TestUtil.sameFiles(holder, thisFile, thisFile));
@@ -66,7 +67,7 @@ public class TestUtilTest extends TestCase {
public void testFileCompareNonClassStaticPositive() throws IOException {
MessageHandler holder = new MessageHandler();
- File basedir = new File("testdata/testCompareTextFiles/sameFile");
+ File basedir = new File(UtilTests.TESTING_UTIL_PATH + "/testdata/testCompareTextFiles/sameFile");
File expectedBaseDir = new File(basedir, "expected");
File actualBaseDir = new File(basedir, "actual");
String filename = "TestUtilTest.java";
@@ -98,7 +99,7 @@ public class TestUtilTest extends TestCase {
return;
}
MessageHandler holder = new MessageHandler();
- File classBase = new File("testdata/testCompareClassFiles");
+ File classBase = new File(UtilTests.TESTING_UTIL_PATH + "/testdata/testCompareClassFiles");
String path = "org/aspectj/testing/util/TestCompareClassFile.class";
File classFile = new File(classBase, path);
diff --git a/testing-util/testsrc/org/aspectj/testing/util/UtilTests.java b/testing-util/testsrc/org/aspectj/testing/util/UtilTests.java
index a32bd424c..cd36e8b60 100644
--- a/testing-util/testsrc/org/aspectj/testing/util/UtilTests.java
+++ b/testing-util/testsrc/org/aspectj/testing/util/UtilTests.java
@@ -18,6 +18,7 @@ import junit.framework.*;
public class UtilTests extends TestCase {
+ public static final String TESTING_UTIL_PATH = "../testing-util";
public static Test suite() {
TestSuite suite = new TestSuite(UtilTests.class.getName());
// for now, do not include SuiteTest because it would take 15 minutes