diff options
author | avasseur <avasseur> | 2005-05-10 15:44:11 +0000 |
---|---|---|
committer | avasseur <avasseur> | 2005-05-10 15:44:11 +0000 |
commit | 83655ff47c1af1ca58c8043626799e0483d5acd4 (patch) | |
tree | 0cd02ea9863cbbb759ab0df465dd60a584855b8f /testing | |
parent | 2c4f9d292a521703642169d8c066792d0e0802f5 (diff) | |
download | aspectj-83655ff47c1af1ca58c8043626799e0483d5acd4.tar.gz aspectj-83655ff47c1af1ca58c8043626799e0483d5acd4.zip |
fix 75442 thru lateTypeMungers, currently @AJaspectOf and perObject are lateTypeMungers. new LTW tests, some fix in the LTW test error reporting
Diffstat (limited to 'testing')
4 files changed, 19 insertions, 10 deletions
diff --git a/testing/newsrc/org/aspectj/testing/AjcTest.java b/testing/newsrc/org/aspectj/testing/AjcTest.java index c1c88cd85..a406ae2fe 100644 --- a/testing/newsrc/org/aspectj/testing/AjcTest.java +++ b/testing/newsrc/org/aspectj/testing/AjcTest.java @@ -30,7 +30,10 @@ public class AjcTest { private static boolean is15VMOrGreater = false; static { - String vm = System.getProperty("java.vm.version"); + String vm = System.getProperty("java.runtime.version"); + if (vm == null) { + vm = System.getProperty("java.vm.version"); + } if (vm.startsWith("1.3")) { is14VMOrGreater = false; } else if (vm.startsWith("1.5")) { diff --git a/testing/newsrc/org/aspectj/testing/AntSpec.java b/testing/newsrc/org/aspectj/testing/AntSpec.java index 84abb4b2a..0623923be 100644 --- a/testing/newsrc/org/aspectj/testing/AntSpec.java +++ b/testing/newsrc/org/aspectj/testing/AntSpec.java @@ -79,6 +79,12 @@ public class AntSpec implements ITestStep { p.setUserProperty("aj.sandbox", inTestCase.getSandboxDirectory().getAbsolutePath()); // setup aj.dir "modules" folder p.setUserProperty("aj.root", new File("..").getAbsolutePath()); + + // create the test implicit path aj.path that contains the sandbox + regular test infra path + Path path = new Path(p, inTestCase.getSandboxDirectory().getAbsolutePath()); + populatePath(path, DEFAULT_LTW_CLASSPATH_ENTRIES); + populatePath(path, AjcTestCase.DEFAULT_CLASSPATH_ENTRIES); + p.addReference("aj.path", path); ProjectHelper helper = ProjectHelper.getProjectHelper(); helper.parse(p, buildFile); @@ -90,6 +96,12 @@ public class AntSpec implements ITestStep { // make sure we listen for failure DefaultLogger consoleLogger = new DefaultLogger() { + public void buildFinished(BuildEvent event) { + super.buildFinished(event); + if (event.getException() != null) { + AjcTestCase.fail(failMessage + "failure " + event.getException()); + } + } public void targetFinished(BuildEvent event) { super.targetFinished(event); if (event.getException() != null) { @@ -111,12 +123,6 @@ public class AntSpec implements ITestStep { consoleLogger.setOutputPrintStream(System.out); consoleLogger.setMessageOutputLevel(m_verbose?Project.MSG_VERBOSE:Project.MSG_ERR); p.addBuildListener(consoleLogger); - - // create the test implicit path aj.path that contains the sandbox + regular test infra path - Path path = new Path(p, inTestCase.getSandboxDirectory().getAbsolutePath()); - populatePath(path, DEFAULT_LTW_CLASSPATH_ENTRIES); - populatePath(path, AjcTestCase.DEFAULT_CLASSPATH_ENTRIES); - p.addReference("aj.path", path); } catch (Throwable t) { AjcTestCase.fail(failMessage + "invalid Ant script :" + t.toString()); } diff --git a/testing/newsrc/org/aspectj/testing/CompileSpec.java b/testing/newsrc/org/aspectj/testing/CompileSpec.java index 93d0e2bb5..4cc0f01de 100644 --- a/testing/newsrc/org/aspectj/testing/CompileSpec.java +++ b/testing/newsrc/org/aspectj/testing/CompileSpec.java @@ -240,10 +240,10 @@ public class CompileSpec implements ITestStep { if (files == null) files = ""; StringTokenizer strTok = new StringTokenizer(files,","); while (strTok.hasMoreTokens()) { - String file = strTok.nextToken(); + final String file = strTok.nextToken(); if (file.endsWith(".jar")) { jarList.add(file); - } else { + } else { fileList.add(file); } } diff --git a/testing/testsrc/org/aspectj/testing/harness/bridge/AbstractRunSpecTest.java b/testing/testsrc/org/aspectj/testing/harness/bridge/AbstractRunSpecTest.java index f7871872d..fdafdca82 100644 --- a/testing/testsrc/org/aspectj/testing/harness/bridge/AbstractRunSpecTest.java +++ b/testing/testsrc/org/aspectj/testing/harness/bridge/AbstractRunSpecTest.java @@ -38,7 +38,7 @@ public class AbstractRunSpecTest extends TestCase { spec.setDescription("some description, with extra"); XMLWriter out = new XMLWriter(new PrintWriter(System.out)); spec.writeXml(out); - out.close(); + //out.close();//FIXME this close System.out and makes the IntelliJ test runner hang (AV) } public void testSetOptions() { |