From daf33c9932e75af599d613619aacd88e3223be32 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 2 Dec 2008 18:03:22 +0000 Subject: [PATCH] 253067: test --- .../pr253067/base/src/aa/AdvisesC.aj | 11 +++++++++++ tests/multiIncremental/pr253067/base/src/aa/C.java | 13 +++++++++++++ .../tools/MultiProjectIncrementalTests.java | 13 +++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 tests/multiIncremental/pr253067/base/src/aa/AdvisesC.aj create mode 100644 tests/multiIncremental/pr253067/base/src/aa/C.java diff --git a/tests/multiIncremental/pr253067/base/src/aa/AdvisesC.aj b/tests/multiIncremental/pr253067/base/src/aa/AdvisesC.aj new file mode 100644 index 000000000..219ddaedb --- /dev/null +++ b/tests/multiIncremental/pr253067/base/src/aa/AdvisesC.aj @@ -0,0 +1,11 @@ +package aa; + +public aspect AdvisesC { + int C.nothing() { + return nothing(); + } + + before() : call(int C.nothing()) { + + } +} diff --git a/tests/multiIncremental/pr253067/base/src/aa/C.java b/tests/multiIncremental/pr253067/base/src/aa/C.java new file mode 100644 index 000000000..2a009e1e8 --- /dev/null +++ b/tests/multiIncremental/pr253067/base/src/aa/C.java @@ -0,0 +1,13 @@ +package aa; + + +public class C { + public C() { + super(); + System.out.println("init C"); + } + +// int nothing() { +// return nothing(); +// } + } diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index 6e7ef3dca..f3bd75376 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -199,6 +199,19 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa // incomplete } + public void testAdvisingCallJoinpointsInITDS_pr253067() { + String p = "pr253067"; + initialiseProject(p); + build(p); + // Check for a code node at line 5 - if there is one then we created it correctly when building + // the advice relationship + IProgramElement root = getModelFor(p).getHierarchy().getRoot(); + IProgramElement code = findElementAtLine(root, 5); + assertEquals("=pr253067