diff options
author | aclement <aclement> | 2008-07-31 20:09:10 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-07-31 20:09:10 +0000 |
commit | 84ac656f3c14285968fda4c83f09201d04571f70 (patch) | |
tree | 8cb0220478607c026dc79eff29a988fab55a1f6e /tests | |
parent | 34bdf6532e15767c950f15108e1ed3c39a1caae3 (diff) | |
download | aspectj-84ac656f3c14285968fda4c83f09201d04571f70.tar.gz aspectj-84ac656f3c14285968fda4c83f09201d04571f70.zip |
inpath weaving test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/model/expected/prX.txt | 16 | ||||
-rw-r--r-- | tests/model/prX/Code.class | bin | 0 -> 405 bytes | |||
-rw-r--r-- | tests/model/prX/Code.java | 11 | ||||
-rw-r--r-- | tests/model/prX/X.java | 3 | ||||
-rw-r--r-- | tests/model/prX/inpath.jar | bin | 0 -> 401 bytes | |||
-rw-r--r-- | tests/src/org/aspectj/systemtest/model/ModelTests.java | 2 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/model/model.xml | 4 |
7 files changed, 36 insertions, 0 deletions
diff --git a/tests/model/expected/prX.txt b/tests/model/expected/prX.txt new file mode 100644 index 000000000..b9190e6af --- /dev/null +++ b/tests/model/expected/prX.txt @@ -0,0 +1,16 @@ +=== MODEL STATUS REPORT ========= After a batch build +<root> [java source file] + X.java [java source file] TEST_SANDBOX\X.java:1: + import declarations [import reference] + X [aspect] TEST_SANDBOX\X.java:1: + before(): <anonymous pointcut>.. [advice] TEST_SANDBOX\X.java:2: +=== END OF MODEL REPORT ========= +=== RELATIONSHIPS REPORT ========= After a batch build +=== END OF RELATIONSHIPS REPORT == +=== Properties of the model and relationships map ===== +FileMapSize=1 +aspect=1 +advice=1 +RelationshipMapSize=0 +java source file=2 +import reference=1 diff --git a/tests/model/prX/Code.class b/tests/model/prX/Code.class Binary files differnew file mode 100644 index 000000000..63e2cc50c --- /dev/null +++ b/tests/model/prX/Code.class diff --git a/tests/model/prX/Code.java b/tests/model/prX/Code.java new file mode 100644 index 000000000..e02c17eef --- /dev/null +++ b/tests/model/prX/Code.java @@ -0,0 +1,11 @@ +public class Code { + public static void main(String[]argv) { + new Code().foo(); + new Code().moo(); + } + + void foo() {} + + int i; + void moo() {} +} diff --git a/tests/model/prX/X.java b/tests/model/prX/X.java new file mode 100644 index 000000000..753146e27 --- /dev/null +++ b/tests/model/prX/X.java @@ -0,0 +1,3 @@ +public aspect X { + before():execution(* *(..)) && !within(X) {} +} diff --git a/tests/model/prX/inpath.jar b/tests/model/prX/inpath.jar Binary files differnew file mode 100644 index 000000000..cbefecd0f --- /dev/null +++ b/tests/model/prX/inpath.jar diff --git a/tests/src/org/aspectj/systemtest/model/ModelTests.java b/tests/src/org/aspectj/systemtest/model/ModelTests.java index 4978f1d5d..d4f597bd3 100644 --- a/tests/src/org/aspectj/systemtest/model/ModelTests.java +++ b/tests/src/org/aspectj/systemtest/model/ModelTests.java @@ -62,6 +62,8 @@ public class ModelTests extends ModelTestCase { } } +// public void testInpathAdvisedCode_prX() { runModelTest("inpath advised elements","prX"); } + public void testSourceLocationAndJarFile_pr145963() {runModelTest("sourcelocation and jar file","pr145963_1");} public void testSourceLocationAndClassFile_pr145963() {runModelTest("sourcelocation and class file","pr145963_2");} public void testAspectInDefaultPackage_pr145963() {runModelTest("aspect in default package", "pr145963_3");} diff --git a/tests/src/org/aspectj/systemtest/model/model.xml b/tests/src/org/aspectj/systemtest/model/model.xml index ff406a992..c4ce0bcb1 100644 --- a/tests/src/org/aspectj/systemtest/model/model.xml +++ b/tests/src/org/aspectj/systemtest/model/model.xml @@ -106,6 +106,10 @@ <message kind="warning" line="20" text="System.out should not be called"/> </compile> </ajc-test> + + <ajc-test dir="model/prX" title="inpath advised elements"> + <compile files="X.java" inpath="inpath.jar" options="-1.5 -emacssym"/> + </ajc-test> </suite> |