diff options
author | mwebster <mwebster> | 2006-11-06 13:51:05 +0000 |
---|---|---|
committer | mwebster <mwebster> | 2006-11-06 13:51:05 +0000 |
commit | c54bc0b1b5db182c431d7c1ac28cbc73edb229c2 (patch) | |
tree | f36aaa504457f7e08737f293c60e480424b12396 /tests | |
parent | 36ba801b8f3f45f8c9acd2af2b03489958b97b55 (diff) | |
download | aspectj-c54bc0b1b5db182c431d7c1ac28cbc73edb229c2.tar.gz aspectj-c54bc0b1b5db182c431d7c1ac28cbc73edb229c2.zip |
Bug 155033 "Use ajcore for LTW problems" (rename HelloWorld HelloWorldWithException)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java | 23 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/ajc153.xml | 10 |
2 files changed, 9 insertions, 24 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java index 3d586958f..6e7e7d546 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java @@ -12,7 +12,6 @@ package org.aspectj.systemtest.ajc150.ataspectj; import java.io.File; -import java.io.FilenameFilter; import junit.framework.Test; @@ -100,13 +99,13 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase { // before File f = new File("_ajdump/_before/com/foo/bar"); - CountingFilenameFilter cff = new CountingFilenameFilter(); + CountingFilenameFilter cff = new CountingFilenameFilter(".class"); f.listFiles(cff); assertEquals("Expected dump file in " + f.getAbsolutePath(),1,cff.getCount()); // after f = new File("_ajdump/com/foo/bar"); - cff = new CountingFilenameFilter(); + cff = new CountingFilenameFilter(".class"); f.listFiles(cff); assertEquals("Expected dump file in " + f.getAbsolutePath(),1,cff.getCount()); @@ -134,11 +133,11 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase { // The working directory is different because this test must be forked File dir = new File("../tests/java5/ataspectj"); File f = new File(dir,"_ajdump/_before"); - CountingFilenameFilter cff = new CountingFilenameFilter(); + CountingFilenameFilter cff = new CountingFilenameFilter(".class"); f.listFiles(cff); assertEquals("Expected dump file in " + f.getAbsolutePath(),1,cff.getCount()); f = new File(dir,"_ajdump"); - cff = new CountingFilenameFilter(); + cff = new CountingFilenameFilter(".class"); f.listFiles(cff); assertEquals(1,cff.getCount()); @@ -215,18 +214,4 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase { public void testCflowBelowStack() { runTest("CflowBelowStack"); } - - private static class CountingFilenameFilter implements FilenameFilter { - - private int count; - - public boolean accept(File dir, String name) { - if (name.endsWith(".class")) count++; - return false; - } - - public int getCount() { - return count; - } - } } diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml index 85219fc09..10bb31e01 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -576,17 +576,17 @@ </ajc-test> <ajc-test dir="ltw" title="reweavableAspectNotRegistered error"> - <compile files="HelloWorld.java, ExceptionHandler.aj" options="-showWeaveInfo"> - <message kind="weave" text="Join point 'method-execution(void HelloWorld.main(java.lang.String[]))' in Type 'HelloWorld' (HelloWorld.java:3) advised by around advice from 'ExceptionHandler' (ExceptionHandler.aj:2)"/> + <compile files="HelloWorldWithException.java, ExceptionHandler.aj" options="-showWeaveInfo"> + <message kind="weave" text="Join point 'method-execution(void HelloWorldWithException.main(java.lang.String[]))' in Type 'HelloWorldWithException' (HelloWorldWithException.java:3) advised by around advice from 'ExceptionHandler' (ExceptionHandler.aj:2)"/> </compile> <compile files="EmptyAspect.aj"> </compile> - <run class="HelloWorld" ltw="aop-missingaspect.xml"> + <run class="HelloWorldWithException" ltw="aop-missingaspect.xml"> <stdout> <line text="Hello World!"/> </stdout> <stderr> - <line text="error aspect 'ExceptionHandler' woven into 'HelloWorld' must be defined to the weaver (placed on the aspectpath, or defined in an aop.xml file if using LTW)."/> + <line text="error aspect 'ExceptionHandler' woven into 'HelloWorldWithException' must be defined to the weaver (placed on the aspectpath, or defined in an aop.xml file if using LTW)."/> </stderr> </run> </ajc-test> @@ -672,7 +672,7 @@ <ajc-test dir="ltw" title="NPE with custom agent" keywords="ltw"> <compile files="java/net/URLClassLoader.java"/> - <compile files="HelloWorld.java" options="-outjar hello.jar"/> + <compile files="HelloWorldWithException.java" options="-outjar hello.jar"/> <compile files="ExceptionHandler.aj" options="-outxml -outjar handler.jar"/> <compile files="NullSecurityManager.java" options="-outjar security.jar"/> <ant file="ant.xml" target="NPE with custom agent" verbose="true"> |