From: aclement Date: Thu, 31 Jul 2008 20:09:10 +0000 (+0000) Subject: inpath weaving test X-Git-Tag: V162DEV_M1~153 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=84ac656f3c14285968fda4c83f09201d04571f70;p=aspectj.git inpath weaving test --- 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 + [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(): .. [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 new file mode 100644 index 000000000..63e2cc50c Binary files /dev/null and b/tests/model/prX/Code.class differ 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 new file mode 100644 index 000000000..cbefecd0f Binary files /dev/null and b/tests/model/prX/inpath.jar differ 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 @@ + + + +