diff options
author | aclement <aclement> | 2008-09-30 20:51:53 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-09-30 20:51:53 +0000 |
commit | 9b68a31302174ba06218e5e1182653297f722110 (patch) | |
tree | dc48b32f1619797833c996c1b6fdfd143c9c5856 /tests/multiIncremental | |
parent | aca78f796d64583e8d17aac0bff6f6e502bbafa4 (diff) | |
download | aspectj-9b68a31302174ba06218e5e1182653297f722110.tar.gz aspectj-9b68a31302174ba06218e5e1182653297f722110.zip |
192877: testcode
Diffstat (limited to 'tests/multiIncremental')
6 files changed, 49 insertions, 0 deletions
diff --git a/tests/multiIncremental/PR192877/base/src/DefaultTestImpl.java b/tests/multiIncremental/PR192877/base/src/DefaultTestImpl.java new file mode 100644 index 000000000..1a2954354 --- /dev/null +++ b/tests/multiIncremental/PR192877/base/src/DefaultTestImpl.java @@ -0,0 +1,10 @@ + +public class DefaultTestImpl implements Test { + public void methodA() { + System.out.println("methodA"); + } + + public void methodB() { + System.out.println("methodB"); + } +} diff --git a/tests/multiIncremental/PR192877/base/src/Foo.java b/tests/multiIncremental/PR192877/base/src/Foo.java new file mode 100644 index 000000000..9eac48b58 --- /dev/null +++ b/tests/multiIncremental/PR192877/base/src/Foo.java @@ -0,0 +1,4 @@ + +public interface Foo { + void doSomething(); +} diff --git a/tests/multiIncremental/PR192877/base/src/FooImpl.java b/tests/multiIncremental/PR192877/base/src/FooImpl.java new file mode 100644 index 000000000..85c45fa74 --- /dev/null +++ b/tests/multiIncremental/PR192877/base/src/FooImpl.java @@ -0,0 +1,5 @@ +public class FooImpl implements Foo { + public void doSomething() { + System.out.println("doSomething"); + } +} diff --git a/tests/multiIncremental/PR192877/base/src/Test.java b/tests/multiIncremental/PR192877/base/src/Test.java new file mode 100644 index 000000000..7d6914e2c --- /dev/null +++ b/tests/multiIncremental/PR192877/base/src/Test.java @@ -0,0 +1,5 @@ +public interface Test { + void methodA(); + + void methodB(); +} diff --git a/tests/multiIncremental/PR192877/base/src/TestAspect.java b/tests/multiIncremental/PR192877/base/src/TestAspect.java new file mode 100644 index 000000000..50d1d1dc9 --- /dev/null +++ b/tests/multiIncremental/PR192877/base/src/TestAspect.java @@ -0,0 +1,20 @@ +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.annotation.DeclareParents; + +@Aspect +public class TestAspect { + @DeclareParents(value="Foo+",defaultImpl=DefaultTestImpl.class) + public Test implementedInterface; + + @Before("execution(* Foo.doSomething()) && this(t)") + public void verifyRunningSender(Test t) { + t.methodA(); + t.methodB(); + } + + public static void main(String[] args) { + Foo foo = new FooImpl(); + foo.doSomething(); + } +}
\ No newline at end of file diff --git a/tests/multiIncremental/PR192877/inc1/src/Test.java b/tests/multiIncremental/PR192877/inc1/src/Test.java new file mode 100644 index 000000000..7d6914e2c --- /dev/null +++ b/tests/multiIncremental/PR192877/inc1/src/Test.java @@ -0,0 +1,5 @@ +public interface Test { + void methodA(); + + void methodB(); +} |