diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java | 54 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc167/overweaving.xml | 44 |
2 files changed, 98 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java b/tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java new file mode 100644 index 000000000..2f6bd8531 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2008 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://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andy Clement - initial API and implementation + *******************************************************************************/ +package org.aspectj.systemtest.ajc167; + +import java.io.File; + +import junit.framework.Test; + +import org.aspectj.testing.XMLBasedAjcTestCase; + +/** + * + * @author Andy Clement + */ +public class OverweavingTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public void testSimple() { + runTest("simple"); + } + + /** + * Now an aspect used on the original weave is mentioned in the aop.xml - we shouldn't apply it again! + */ + public void testMessy() { + runTest("messy"); + } + + /** + * Testing a shadow munger created to support cflow + */ + public void testCflow() { + runTest("cflow"); + } + + // -- + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(OverweavingTests.class); + } + + @Override + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/ajc167/overweaving.xml"); + } + +}
\ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc167/overweaving.xml b/tests/src/org/aspectj/systemtest/ajc167/overweaving.xml new file mode 100644 index 000000000..84bed6486 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc167/overweaving.xml @@ -0,0 +1,44 @@ +<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]> + +<suite> + + <ajc-test dir="features167/overweaving" title="simple"> + <compile files="A.aj C.java" options="-1.5"/> + <compile files="X.aj" options="-1.5 -Xlint:ignore"/> + <run class="com.andy.C" ltw="aop.xml"> + <stdout> + <line text="AspectX>>execution(void com.andy.C.main(String[]))"/> + <line text="AspectA>>execution(void com.andy.C.main(String[]))"/> + <line text="AspectX>>execution(void com.andy.C.run())"/> + <line text="hello andy"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="features167/overweaving/messy" title="messy"> + <compile files="A.aj C.java" options="-1.5"/> + <compile files="X.aj" options="-1.5 -Xlint:ignore"/> + <run class="com.andy.C" ltw="aop.xml"> + <stdout> + <line text="AspectX>>execution(void com.andy.C.main(String[]))"/> + <line text="AspectA>>execution(void com.andy.C.main(String[]))"/> + <line text="AspectX>>execution(void com.andy.C.run())"/> + <line text="hello andy"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="features167/overweaving/cflow" title="cflow"> + <compile files="A.aj C.java" options="-1.5"/> + <compile files="X.aj" options="-1.5 -Xlint:ignore"/> + <run class="com.andy.C" ltw="aop.xml"> + <stdout> + <line text="AspectX>>execution(void com.andy.C.main(String[]))"/> + <line text="AspectA>>execution(void com.andy.C.main(String[]))"/> + <line text="AspectX>>execution(void com.andy.C.run())"/> + <line text="hello andy"/> + </stdout> + </run> + </ajc-test> + +</suite>
\ No newline at end of file |