From 84ac656f3c14285968fda4c83f09201d04571f70 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 31 Jul 2008 20:09:10 +0000 Subject: [PATCH] inpath weaving test --- tests/model/expected/prX.txt | 16 ++++++++++++++++ tests/model/prX/Code.class | Bin 0 -> 405 bytes tests/model/prX/Code.java | 11 +++++++++++ tests/model/prX/X.java | 3 +++ tests/model/prX/inpath.jar | Bin 0 -> 401 bytes .../aspectj/systemtest/model/ModelTests.java | 2 ++ .../src/org/aspectj/systemtest/model/model.xml | 4 ++++ 7 files changed, 36 insertions(+) create mode 100644 tests/model/expected/prX.txt create mode 100644 tests/model/prX/Code.class create mode 100644 tests/model/prX/Code.java create mode 100644 tests/model/prX/X.java create mode 100644 tests/model/prX/inpath.jar 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 0000000000000000000000000000000000000000..63e2cc50ce8f883ed8979a8027849ed2bd9fdab3 GIT binary patch literal 405 zcmah^Jxc>Y6r6XT=5i*{e29gGU9>P*SVe3EK?qtz1hKk{YuJ#xgX5C_Wn(}gKfoU) z&J!_(g~iU!dpk4l?Z@Za8o(*`A_QoMs7G+nR_G{nL-YhgZ;GqMbocsMm?6cB{Ka)Z>`GfytD%hda G!R{A^NHgyM literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..cbefecd0f63d03bf494a946d39f79683a05c057a GIT binary patch literal 401 zcmWIWW@Zs#-~dA7^#2wNNPvrhg~2&LB~>puC$YHr-zf%$*1r8-%#H%b_V2yB+jzEd z`7HaS#6)pj9Ox-WqUwT}8hvSIF1rSP)pIQqM8w2C&%Sx{{p^|V z=lAO~EWdHN<3iuXD;yWnN+j+|*fKuU$YWW={XDi-Q{lHeKhvvKHQSh8UZ||L)-Q^_ zJG;hBHdNv{Yt`T753lT*b@0rOlL;Z==lsvz)QCSdDZ=3EiaFuQ)o*Xyc+jc-#`8jh z-vlG0jK&<}mwNMW74|ys(qHtL)wM@=(V|&7N7VN6X?%{a*wauE%_W?)C1+EC^xCOk zdfW=P|L%NH$oP|Q>$*d|TUkA)Y;j!JJmFQz-rV}qlk4Uo16n#aHZ0C8H9f&c&j literal 0 HcmV?d00001 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 @@ + + + + -- 2.39.5