summaryrefslogtreecommitdiffstats
path: root/build/testsrc
diff options
context:
space:
mode:
Diffstat (limited to 'build/testsrc')
-rw-r--r--build/testsrc/BuildModuleTests.java11
-rw-r--r--build/testsrc/org/aspectj/internal/build/BuildModuleTest.java2
-rw-r--r--build/testsrc/org/aspectj/internal/build/ModulesTest.java4
3 files changed, 10 insertions, 7 deletions
diff --git a/build/testsrc/BuildModuleTests.java b/build/testsrc/BuildModuleTests.java
index 60c5b091a..6939c6db4 100644
--- a/build/testsrc/BuildModuleTests.java
+++ b/build/testsrc/BuildModuleTests.java
@@ -16,6 +16,7 @@
import org.aspectj.internal.tools.ant.taskdefs.Checklics;
import org.aspectj.internal.tools.build.Builder;
+import org.aspectj.internal.tools.build.Util;
import org.aspectj.internal.build.BuildModuleTest;
import org.aspectj.internal.build.ModulesTest;
@@ -42,7 +43,7 @@ public class BuildModuleTests extends TestCase {
/** replace commented out below - if any replace failed, halt all */
private static boolean replaceFailed = false;
- private static final String BASE_DIR = "../";
+ private static final String BASE_DIR = ".." + File.separator;
private static final String[] JDT_SOURCE_DIRS = new String[] {};
public static Test suite() {
@@ -111,7 +112,7 @@ public class BuildModuleTests extends TestCase {
}
public void testLicense_org_eclipse_jdt_core() {
final String mod = "org.eclipse.jdt.core";
- final String pre = BASE_DIR + mod + "/";
+ final String pre = BASE_DIR + mod + File.separator;
for (int i = 0; i < JDT_SOURCE_DIRS.length; i++) {
checkSourceDirectory(new File(pre + JDT_SOURCE_DIRS[i]), mod);
}
@@ -140,12 +141,12 @@ public class BuildModuleTests extends TestCase {
}
public void testLicense_weaver() {
String module = "weaver";
- checkSourceDirectory(new File("../" + module + "/src"), module);
- checkSourceDirectory(new File("../" + module + "/testsrc/org"), module);
+ checkSourceDirectory(new File(Util.path(new String[] {"..", module, "src"})), module);
+ checkSourceDirectory(new File(Util.path(new String[] {"..", module, "testsrc", "org"})), module);
}
void checkLicense(String module) {
- File moduleDir = new File(".." + File.separator + module);
+ File moduleDir = new File(Util.path("..", module));
File[] srcDirs = findSourceRoots(moduleDir);
for (int i = 0; i < srcDirs.length; i++) {
checkSourceDirectory(srcDirs[i], module);
diff --git a/build/testsrc/org/aspectj/internal/build/BuildModuleTest.java b/build/testsrc/org/aspectj/internal/build/BuildModuleTest.java
index 295ee1e83..8a7f1edd0 100644
--- a/build/testsrc/org/aspectj/internal/build/BuildModuleTest.java
+++ b/build/testsrc/org/aspectj/internal/build/BuildModuleTest.java
@@ -200,7 +200,7 @@ public class BuildModuleTest extends TestCase {
File jarDir = getJarDir();
assertTrue(jarDir.canWrite() || jarDir.mkdirs());
tempFiles.add(jarDir);
- File moduleDir = new File("../" + module);
+ File moduleDir = new File(Util.path("..", module));
assertTrue(moduleDir.canRead());
task.setModuledir(new Path(project, moduleDir.getAbsolutePath()));
task.setJardir(new Path(project, jarDir.getAbsolutePath()));
diff --git a/build/testsrc/org/aspectj/internal/build/ModulesTest.java b/build/testsrc/org/aspectj/internal/build/ModulesTest.java
index fee0d5cf6..2715e22b9 100644
--- a/build/testsrc/org/aspectj/internal/build/ModulesTest.java
+++ b/build/testsrc/org/aspectj/internal/build/ModulesTest.java
@@ -31,6 +31,7 @@ import org.aspectj.internal.tools.ant.taskdefs.BuildModule;
import org.aspectj.internal.tools.build.Messager;
import org.aspectj.internal.tools.build.Module;
import org.aspectj.internal.tools.build.Modules;
+import org.aspectj.internal.tools.build.Util;
/**
*
*/
@@ -183,7 +184,8 @@ public class ModulesTest extends TestCase {
File buildDir = new File(modulesDir, "aj-build");
File distDir = new File(buildDir, "dist");
File jarDir = new File(buildDir, "jars");
- File productDir = new File(modulesDir, "build/products/" + productName);
+ File productDir = new File(modulesDir,
+ Util.path(new String[] {"build", "products", productName}));
jarDir.mkdirs();
distDir.mkdirs();