diff options
author | aclement <aclement> | 2005-11-26 16:36:23 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-26 16:36:23 +0000 |
commit | 3ce492be631f9f598bbf9d1e045e4d9637885bf1 (patch) | |
tree | 50ee0c552d617078497916ba9f5db8fd8682ed2d /tests/java5 | |
parent | 249d797a9eb4cbcd7bfdc658e128770eaeacc400 (diff) | |
download | aspectj-3ce492be631f9f598bbf9d1e045e4d9637885bf1.tar.gz aspectj-3ce492be631f9f598bbf9d1e045e4d9637885bf1.zip |
Matthews changes - enabling us to see bytecode before and after LTW (bug 117854)
Diffstat (limited to 'tests/java5')
6 files changed, 42 insertions, 19 deletions
diff --git a/tests/java5/ataspectj/ataspectj/DumpTest.java b/tests/java5/ataspectj/ataspectj/DumpTest.java index 6039f766a..4fb2b7487 100644 --- a/tests/java5/ataspectj/ataspectj/DumpTest.java +++ b/tests/java5/ataspectj/ataspectj/DumpTest.java @@ -21,25 +21,7 @@ import java.io.File; public class DumpTest extends TestCase { public static void main(String[] args) { - TestHelper.runAndThrowOnFailure(suite()); - } - - public static junit.framework.Test suite() { - return new junit.framework.TestSuite(DumpTest.class); - } - - public void testDump() { - File f = new File("_ajdump/ataspectj/DumpTest.class"); - assertFalse(f.exists()); - - DumpTestTheDump forceLoad = new DumpTestTheDump(); - f = new File("_ajdump/ataspectj/DumpTestTheDump.class"); - assertTrue(f.exists()); - - // tidy up... - f.delete(); - new File("_ajdump/ataspectj").delete(); - new File("_ajdump").delete(); + new DumpTestTheDump().aroundMethod("DumpTest"); } } diff --git a/tests/java5/ataspectj/ataspectj/DumpTestTheDump.java b/tests/java5/ataspectj/ataspectj/DumpTestTheDump.java index d2f65ff34..f33ffa85a 100644 --- a/tests/java5/ataspectj/ataspectj/DumpTestTheDump.java +++ b/tests/java5/ataspectj/ataspectj/DumpTestTheDump.java @@ -15,4 +15,7 @@ package ataspectj; * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a> */ public class DumpTestTheDump { + public void aroundMethod (String s) { + + } } diff --git a/tests/java5/ataspectj/ataspectj/TestAroundAspect.aj b/tests/java5/ataspectj/ataspectj/TestAroundAspect.aj new file mode 100644 index 000000000..8ae2954c3 --- /dev/null +++ b/tests/java5/ataspectj/ataspectj/TestAroundAspect.aj @@ -0,0 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2005 Contributors. + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://eclipse.org/legal/epl-v10.html + * + * Contributors: + * Matthew Webster initial implementation + *******************************************************************************/ +package ataspectj; + +public aspect TestAroundAspect { + Object around () : execution(public void aroundMethod(..)) { + return proceed(); + } +} diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml b/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml new file mode 100644 index 000000000..c2824e2be --- /dev/null +++ b/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<aspectj> + <weaver options="-XmessageHandlerClass:ataspectj.TestHelper"> + <dump within="ataspectj.DumpTestThe*" beforeandafter="true"/> + </weaver> +</aspectj> diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml b/tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml new file mode 100644 index 000000000..d73c1c23b --- /dev/null +++ b/tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<aspectj> + <aspects> + <aspect name="ataspectj.TestAroundAspect"/> + </aspects> + <weaver options="-Xnoinline"> + <dump within="ataspectj.DumpTestThe*" beforeandafter="true"/> + </weaver> +</aspectj> diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpnone.xml b/tests/java5/ataspectj/ataspectj/aop-dumpnone.xml new file mode 100644 index 000000000..425f9ad23 --- /dev/null +++ b/tests/java5/ataspectj/ataspectj/aop-dumpnone.xml @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<aspectj> + <weaver options="-XmessageHandlerClass:ataspectj.TestHelper"> + </weaver> +</aspectj> |