From: aclement Date: Wed, 4 Mar 2009 00:54:28 +0000 (+0000) Subject: declaremixin: testcode X-Git-Tag: pre268419~41 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=191fdaa9238a231cc6bdce67c848f909ef43f44b;p=aspectj.git declaremixin: testcode --- diff --git a/tests/src/org/aspectj/systemtest/ajc164/DeclareMixinTests.java b/tests/src/org/aspectj/systemtest/ajc164/DeclareMixinTests.java index af40353c3..c7e26efa3 100644 --- a/tests/src/org/aspectj/systemtest/ajc164/DeclareMixinTests.java +++ b/tests/src/org/aspectj/systemtest/ajc164/DeclareMixinTests.java @@ -25,14 +25,62 @@ import org.aspectj.testing.XMLBasedAjcTestCase; * * * @author Andy Clement */ public class DeclareMixinTests extends org.aspectj.testing.XMLBasedAjcTestCase { - public void testSimpleCase() { - // runTest("simple case"); + // Very basics with a simple static factory method + public void testCaseA() { + runTest("casea"); + } + + // non static factory method, will need aspectOf() calling on + // the aspect before the factory is called + public void testCaseB() { + runTest("caseb"); + } + + // factory method takes the object for which the delegate exists + public void testCaseC() { + runTest("casec"); + } + + // factory method is non static and takes the object for which the delegate is being created + public void testCaseD() { + runTest("cased"); + } + + // multiple instances causing factory invocation multiple times (but is cached) + public void testCaseE() { + runTest("casee"); + } + + // Factory method directly takes the type specified in the Mixin target (strongly typed) + public void testCaseF() { + runTest("casef"); + } + + // targeting multiple types from the Mixin + public void testCaseG() { + runTest("caseg"); + } + + // Null value for mixin target pattern + public void testCaseH() { + runTest("caseh"); + } + + // Invalid interfaces annotation value entries + public void testCaseI() { + runTest("casei"); } // -- diff --git a/tests/src/org/aspectj/systemtest/ajc164/declareMixin.xml b/tests/src/org/aspectj/systemtest/ajc164/declareMixin.xml index 67148f908..a9ed438ba 100644 --- a/tests/src/org/aspectj/systemtest/ajc164/declareMixin.xml +++ b/tests/src/org/aspectj/systemtest/ajc164/declareMixin.xml @@ -2,9 +2,92 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file