aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2005-12-12 15:42:19 +0000
committeraclement <aclement>2005-12-12 15:42:19 +0000
commit9edb4b6f9e8ca59b309ac382e6049321832d0700 (patch)
tree04a0552d85873d498fd00f9b9135e63cbfa3a14f /tests
parent354653d5afebb6dfdb631cadeb2f4474d5371107 (diff)
downloadaspectj-9edb4b6f9e8ca59b309ac382e6049321832d0700.tar.gz
aspectj-9edb4b6f9e8ca59b309ac382e6049321832d0700.zip
fixes for 120363 : from matthew (include/exclude problems for LTW)
Diffstat (limited to 'tests')
-rw-r--r--tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml8
-rw-r--r--tests/java5/ataspectj/com/foo/bar/Test$$EnhancerByCGLIB$$12345.java (renamed from tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java)3
-rw-r--r--tests/java5/ataspectj/com/foo/bar/Test.java19
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java17
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml14
5 files changed, 48 insertions, 13 deletions
diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml b/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml
index 487d5dd62..43b749053 100644
--- a/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml
+++ b/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
<aspectj>
- <weaver options="-verbose">
- <dump within="ataspectj..*" beforeandafter="true"/>
- </weaver>
+ <weaver options="-XlazyTjp -verbose">
+ <dump within="com.foo.bar..*" beforeandafter="true"/>
+ <include within="com.foo..*"/>
+ <exclude within="com.foo.bar..*CGLIB*"/>
+ </weaver>
</aspectj>
diff --git a/tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java b/tests/java5/ataspectj/com/foo/bar/Test$$EnhancerByCGLIB$$12345.java
index 78df5f1b1..3640800b6 100644
--- a/tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java
+++ b/tests/java5/ataspectj/com/foo/bar/Test$$EnhancerByCGLIB$$12345.java
@@ -8,12 +8,13 @@
* Contributors:
* Matthew Webster - initial implementation
*******************************************************************************/
-package ataspectj;
+package com.foo.bar;
public class Test$$EnhancerByCGLIB$$12345 {
public static void main(String[] args) {
System.out.println("Test$$EnhancerByCGLIB$$12345.main()");
+ Test.main(args);
}
}
diff --git a/tests/java5/ataspectj/com/foo/bar/Test.java b/tests/java5/ataspectj/com/foo/bar/Test.java
new file mode 100644
index 000000000..a1629a7b4
--- /dev/null
+++ b/tests/java5/ataspectj/com/foo/bar/Test.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * Matthew Webster - initial implementation
+ *******************************************************************************/
+package com.foo.bar;
+
+public class Test {
+
+ public static void main(String[] args) {
+ System.out.println("Test.main()");
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java
index 7c2e52978..eb4ad7445 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java
@@ -97,11 +97,18 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase {
public void testLTWDumpBeforeAndAfter() {
runTest("LTW DumpTest before and after");
+
+ // before
+ File f = new File("_ajdump/_before/com/foo/bar");
+ CountingFilenameFilter cff = new CountingFilenameFilter();
+ f.listFiles(cff);
+ assertEquals("Expected dump file in " + f.getAbsolutePath(),1,cff.getCount());
- File f = new File("_ajdump/_before/ataspectj/Test$$EnhancerByCGLIB$$12345.class");
- assertTrue(f.exists());
- f = new File("_ajdump/ataspectj/Test$$EnhancerByCGLIB$$12345.class");
- assertTrue(f.exists());
+ // after
+ f = new File("_ajdump/com/foo/bar");
+ cff = new CountingFilenameFilter();
+ f.listFiles(cff);
+ assertEquals("Expected dump file in " + f.getAbsolutePath(),1,cff.getCount());
// tidy up...
f = new File("_ajdump");
@@ -127,12 +134,10 @@ 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");
- System.out.println("AtAjLTWTests.testLTWDumpProxy() f=" + f.getAbsolutePath());
CountingFilenameFilter cff = new CountingFilenameFilter();
f.listFiles(cff);
assertEquals("Expected dump file in " + f.getAbsolutePath(),1,cff.getCount());
f = new File(dir,"_ajdump");
- System.out.println("AtAjLTWTests.testLTWDumpProxy() f=" + f.getAbsolutePath());
cff = new CountingFilenameFilter();
f.listFiles(cff);
assertEquals(1,cff.getCount());
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml
index 6b7f35987..6cf87b52c 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml
@@ -92,12 +92,20 @@
options="-1.5"/>
<run class="ataspectj.DumpTest" ltw="ataspectj/aop-dump.xml"/>
</ajc-test>
-
+
<ajc-test dir="java5/ataspectj" title="LTW DumpTest before and after">
<compile
- files="ataspectj/Test$$EnhancerByCGLIB$$12345.java"
+ files="com/foo/bar/Test.java, com/foo/bar/Test$$EnhancerByCGLIB$$12345.java"
options="-1.5"/>
- <run class="ataspectj.Test$$EnhancerByCGLIB$$12345" ltw="ataspectj/aop-dumpbeforeandafter.xml"/>
+ <run class="com.foo.bar.Test$$EnhancerByCGLIB$$12345" ltw="ataspectj/aop-dumpbeforeandafter.xml">
+ <stdout>
+ <line text="Test$$EnhancerByCGLIB$$12345.main()"/>
+ <line text="Test.main()"/>
+ </stdout>
+ <stderr>
+ <line text="info weaving 'com.foo.bar.Test'"/>
+ </stderr>
+ </run>
</ajc-test>
<ajc-test dir="java5/ataspectj" title="LTW DumpTest closure">