Browse Source

Test LTW dump for JSPs

tags/Root_extensions
mwebster 17 years ago
parent
commit
fe356d2b74

+ 9
- 0
tests/java5/ataspectj/ataspectj/aop-dumpjsp.xml View File

@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<aspectj>
<aspects>
<aspect name="ataspectj.EmptyAspect"/>
</aspects>
<weaver options="-verbose -debug">
<dump within="com.ibm._jsp..*" beforeandafter="true"/>
</weaver>
</aspectj>

+ 8
- 0
tests/java5/ataspectj/com/ibm/_jsp/_abc123_xyz890.java View File

@@ -0,0 +1,8 @@
package com.ibm._jsp;

public class _abc123_xyz890 {
public static void main (String[] args) {
System.out.println("? _abc123_xyz890.main()");
}
}

+ 19
- 0
tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java View File

@@ -147,6 +147,25 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase {
f.delete();
}

public void testLTWDumpJSP () {
runTest("LTW DumpTest JSP");

// The working directory is different because this test must be forked
File f = new File("_ajdump/_before/com/ibm/_jsp");
CountingFilenameFilter cff = new CountingFilenameFilter(".class");
f.listFiles(cff);
assertEquals("Expected dump file in " + f.getAbsolutePath(),1,cff.getCount());
f = new File("_ajdump/com/ibm/_jsp");
cff = new CountingFilenameFilter(".class");
f.listFiles(cff);
assertEquals(1,cff.getCount());
// tidy up...
f = new File("_ajdump");
FileUtil.deleteContents(f);
f.delete();
}
public void testAjcAspect1LTWAspect2_Xreweavable() {
runTest("Ajc Aspect1 LTW Aspect2 -Xreweavable");
}

+ 10
- 0
tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml View File

@@ -136,6 +136,16 @@
<ant file="ajc-ant.xml" target="ltw.DumpProxyTest" verbose="true"/>
</ajc-test>

<ajc-test dir="java5/ataspectj" title="LTW DumpTest JSP">
<compile
files="ataspectj/EmptyAspect.aj"
options="-1.5 -Xlint:ignore"/>
<compile
files="com/ibm/_jsp/_abc123_xyz890.java"
options="-1.5"/>
<run class="com.ibm._jsp._abc123_xyz890" ltw="ataspectj/aop-dumpjsp.xml"/>
</ajc-test>

<ajc-test dir="java5/ataspectj" title="Ajc Aspect1 LTW Aspect2 -Xreweavable">
<compile
files="ataspectj/ltwreweavable/Main.java,ataspectj/ltwreweavable/Aspect1.java,ataspectj/ltwreweavable/Advisable.java"

Loading…
Cancel
Save