From 7d8851f559f7c2d6804b312f34206a08b1665af9 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 23 Oct 2007 07:50:45 +0000 Subject: macfixes: can cope when /tmp is a link to somewhere --- ajde.core/testsrc/org/aspectj/ajde/core/AjdeCoreTestCase.java | 4 ++-- ajde.core/testsrc/org/aspectj/ajde/core/tests/AjConfigTests.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ajde.core/testsrc/org/aspectj/ajde/core/AjdeCoreTestCase.java b/ajde.core/testsrc/org/aspectj/ajde/core/AjdeCoreTestCase.java index 08ee203ff..26e3cb82d 100644 --- a/ajde.core/testsrc/org/aspectj/ajde/core/AjdeCoreTestCase.java +++ b/ajde.core/testsrc/org/aspectj/ajde/core/AjdeCoreTestCase.java @@ -55,12 +55,12 @@ public class AjdeCoreTestCase extends TestCase { * Fill in the working directory with the project files and * creates a compiler instance for this project */ - public void initialiseProject(String projectName) { + public void initialiseProject(String projectName) throws IOException { File projectSrc=new File(testdataSrcDir + File.separatorChar + projectName); File destination=new File(getWorkingDir(),projectName); if (!destination.exists()) {destination.mkdir();} copy(projectSrc,destination); - projectDir = destination.getAbsolutePath(); + projectDir = destination.getCanonicalPath();//getAbsolutePath(); compiler = new AjCompiler( projectDir, diff --git a/ajde.core/testsrc/org/aspectj/ajde/core/tests/AjConfigTests.java b/ajde.core/testsrc/org/aspectj/ajde/core/tests/AjConfigTests.java index 53dd64577..c38c4e20e 100644 --- a/ajde.core/testsrc/org/aspectj/ajde/core/tests/AjConfigTests.java +++ b/ajde.core/testsrc/org/aspectj/ajde/core/tests/AjConfigTests.java @@ -11,6 +11,7 @@ package org.aspectj.ajde.core.tests; import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -204,13 +205,13 @@ public class AjConfigTests extends AjdeCoreTestCase { assertTrue( "XserializableAspects", buildConfig.isXserializableAspects() ); } - public void testProjectSourceFiles() { + public void testProjectSourceFiles() throws IOException { String f = getAbsoluteProjectDir() + File.separator + "C.java"; List files = new ArrayList(); files.add(f); compilerConfig.setProjectSourceFiles(files); AjBuildConfig buildConfig = genAjBuildConfig(); - String found = ((File)buildConfig.getFiles().get(0)).getAbsolutePath(); + String found = ((File)buildConfig.getFiles().get(0)).getCanonicalPath();//AbsolutePath(); assertEquals("expected source file " + f + ", but found " + found, f, found); } -- cgit v1.2.3