aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/java/org/aspectj/systemtest/ajc167/OverweavingTests.java
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2019-01-30 16:55:38 -0800
committerAndy Clement <aclement@pivotal.io>2019-01-30 16:55:38 -0800
commit2b24e7377da7c849fe7f9f4fa06a701664f9d27d (patch)
tree64c36c8fcf29633af7a5e2f7405b94cbec629ca8 /tests/src/test/java/org/aspectj/systemtest/ajc167/OverweavingTests.java
parentd60de8d0b3e62eb36b612a824bb9345d865c0155 (diff)
downloadaspectj-2b24e7377da7c849fe7f9f4fa06a701664f9d27d.tar.gz
aspectj-2b24e7377da7c849fe7f9f4fa06a701664f9d27d.zip
mavenizing tests - wip
Diffstat (limited to 'tests/src/test/java/org/aspectj/systemtest/ajc167/OverweavingTests.java')
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc167/OverweavingTests.java84
1 files changed, 84 insertions, 0 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc167/OverweavingTests.java b/tests/src/test/java/org/aspectj/systemtest/ajc167/OverweavingTests.java
new file mode 100644
index 000000000..ebd66a0b5
--- /dev/null
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc167/OverweavingTests.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Contributors
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andy Clement - initial API and implementation
+ *******************************************************************************/
+package org.aspectj.systemtest.ajc167;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+/**
+ * Testing whether AspectJ can overweave. Overweaving is where we attempt to weave something that has already been woven. The simple
+ * rule followed is that aspects that applied to the type before are not applied this time around (if they are visible to the
+ * weaver).
+ *
+ * @author Andy Clement
+ */
+public class OverweavingTests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+ public void testGetSet1() {
+ runTest("getset - 1"); // testing what should happen for get/set
+ }
+
+ public void testGetSet2() {
+ runTest("getset - 2"); // testing what actually happens when overweaving
+ }
+
+ public void testGetSetTjp1() {
+ runTest("getset - tjp - 1");
+ }
+
+ public void testCalls1() {
+ runTest("calls - 1"); // testing what should happen for calls
+ }
+
+ public void testCalls2() {
+ runTest("calls - 2"); // testing what actually happens when overweaving
+ }
+
+ public void testCallsTjp1() {
+ runTest("calls - tjp - 1");
+ }
+
+ public void testComplex() {
+ runTest("really messy");
+ }
+
+ public void testSimple() {
+ runTest("simple");
+ }
+
+ /**
+ * Now an aspect used on the original weave is mentioned in the aop.xml - we shouldn't apply it again!
+ */
+ public void testMessy() {
+ runTest("messy");
+ }
+
+ /**
+ * Testing a shadow munger created to support cflow
+ */
+ public void testCflow() {
+ runTest("cflow");
+ }
+
+ // --
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(OverweavingTests.class);
+ }
+
+ protected File getSpecFile() {
+ return getClassResource("overweaving.xml");
+ }
+
+} \ No newline at end of file