summaryrefslogtreecommitdiffstats
path: root/tests/incrementalju/initialTests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/incrementalju/initialTests')
-rw-r--r--tests/incrementalju/initialTests/aspectSourceAdded/changes/Detour.20.java7
-rw-r--r--tests/incrementalju/initialTests/aspectSourceAdded/src/Main.java9
-rw-r--r--tests/incrementalju/initialTests/classAdded/src.20/main/Main.java11
-rw-r--r--tests/incrementalju/initialTests/classAdded/src/main/Main.java7
-rw-r--r--tests/incrementalju/initialTests/classRemoved/src.20/main/Main.java8
-rw-r--r--tests/incrementalju/initialTests/classRemoved/src/main/Main.java11
-rw-r--r--tests/incrementalju/initialTests/classUpdated/src.20/main/Main.java8
-rw-r--r--tests/incrementalju/initialTests/classUpdated/src/main/Main.java7
-rw-r--r--tests/incrementalju/initialTests/classWAroundClosureRemoved/src/AdviceOnIntroduced.java26
-rw-r--r--tests/incrementalju/initialTests/classWAroundClosureRemoved/src/Main.java9
-rw-r--r--tests/incrementalju/initialTests/defaultPackage/changes/Main.30.java8
-rw-r--r--tests/incrementalju/initialTests/defaultPackage/changes/Main.50.java7
-rw-r--r--tests/incrementalju/initialTests/defaultPackage/changes/Target.20.java9
-rw-r--r--tests/incrementalju/initialTests/defaultPackage/changes/Target.delete.40.java2
-rw-r--r--tests/incrementalju/initialTests/defaultPackage/src/Main.java7
-rw-r--r--tests/incrementalju/initialTests/sourceAdded/src.20/main/Target.java9
-rw-r--r--tests/incrementalju/initialTests/sourceAdded/src.30/main/Main.java12
-rw-r--r--tests/incrementalju/initialTests/sourceAdded/src/main/Main.java7
-rw-r--r--tests/incrementalju/initialTests/sourceDeleted/src.30/delete/Target.java7
-rw-r--r--tests/incrementalju/initialTests/sourceDeleted/src/delete/DeleteMe.java7
-rw-r--r--tests/incrementalju/initialTests/sourceDeleted/src/delete/Main.java8
-rw-r--r--tests/incrementalju/initialTests/sourceDeleted/src/delete/Target.java8
22 files changed, 194 insertions, 0 deletions
diff --git a/tests/incrementalju/initialTests/aspectSourceAdded/changes/Detour.20.java b/tests/incrementalju/initialTests/aspectSourceAdded/changes/Detour.20.java
new file mode 100644
index 000000000..4cc707b99
--- /dev/null
+++ b/tests/incrementalju/initialTests/aspectSourceAdded/changes/Detour.20.java
@@ -0,0 +1,7 @@
+public aspect Detour {
+
+ void around() : execution(* Main.main(..)) {
+ System.out.println("Main class successfully woven");
+ }
+
+} \ No newline at end of file
diff --git a/tests/incrementalju/initialTests/aspectSourceAdded/src/Main.java b/tests/incrementalju/initialTests/aspectSourceAdded/src/Main.java
new file mode 100644
index 000000000..7c85f90c2
--- /dev/null
+++ b/tests/incrementalju/initialTests/aspectSourceAdded/src/Main.java
@@ -0,0 +1,9 @@
+import org.aspectj.testing.Tester;
+
+public class Main {
+
+ public static void main(String[] args) {
+ Tester.checkFailed("Incremental compilation did not appear to (re)weave Main");
+ }
+
+} \ No newline at end of file
diff --git a/tests/incrementalju/initialTests/classAdded/src.20/main/Main.java b/tests/incrementalju/initialTests/classAdded/src.20/main/Main.java
new file mode 100644
index 000000000..aae295f7f
--- /dev/null
+++ b/tests/incrementalju/initialTests/classAdded/src.20/main/Main.java
@@ -0,0 +1,11 @@
+package main;
+
+public class Main {
+ public static void main (String[] args) {
+ new Target().run();
+ }
+}
+
+class Target {
+ void run() {}
+}
diff --git a/tests/incrementalju/initialTests/classAdded/src/main/Main.java b/tests/incrementalju/initialTests/classAdded/src/main/Main.java
new file mode 100644
index 000000000..185ed42bf
--- /dev/null
+++ b/tests/incrementalju/initialTests/classAdded/src/main/Main.java
@@ -0,0 +1,7 @@
+
+package main;
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
diff --git a/tests/incrementalju/initialTests/classRemoved/src.20/main/Main.java b/tests/incrementalju/initialTests/classRemoved/src.20/main/Main.java
new file mode 100644
index 000000000..dbe5d38ca
--- /dev/null
+++ b/tests/incrementalju/initialTests/classRemoved/src.20/main/Main.java
@@ -0,0 +1,8 @@
+
+package main;
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
+
diff --git a/tests/incrementalju/initialTests/classRemoved/src/main/Main.java b/tests/incrementalju/initialTests/classRemoved/src/main/Main.java
new file mode 100644
index 000000000..aae295f7f
--- /dev/null
+++ b/tests/incrementalju/initialTests/classRemoved/src/main/Main.java
@@ -0,0 +1,11 @@
+package main;
+
+public class Main {
+ public static void main (String[] args) {
+ new Target().run();
+ }
+}
+
+class Target {
+ void run() {}
+}
diff --git a/tests/incrementalju/initialTests/classUpdated/src.20/main/Main.java b/tests/incrementalju/initialTests/classUpdated/src.20/main/Main.java
new file mode 100644
index 000000000..d0b9d37b4
--- /dev/null
+++ b/tests/incrementalju/initialTests/classUpdated/src.20/main/Main.java
@@ -0,0 +1,8 @@
+package main;
+
+public class Main {
+ public static void main (String[] args) {
+ new Main().run();
+ }
+ void run() {}
+}
diff --git a/tests/incrementalju/initialTests/classUpdated/src/main/Main.java b/tests/incrementalju/initialTests/classUpdated/src/main/Main.java
new file mode 100644
index 000000000..185ed42bf
--- /dev/null
+++ b/tests/incrementalju/initialTests/classUpdated/src/main/Main.java
@@ -0,0 +1,7 @@
+
+package main;
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
diff --git a/tests/incrementalju/initialTests/classWAroundClosureRemoved/src/AdviceOnIntroduced.java b/tests/incrementalju/initialTests/classWAroundClosureRemoved/src/AdviceOnIntroduced.java
new file mode 100644
index 000000000..4da93f0ca
--- /dev/null
+++ b/tests/incrementalju/initialTests/classWAroundClosureRemoved/src/AdviceOnIntroduced.java
@@ -0,0 +1,26 @@
+import org.aspectj.testing.Tester;
+
+public aspect AdviceOnIntroduced {
+ public static void main(String[] args) { test(); }
+
+ public static void test() {
+ Tester.checkEqual(new Foo(10).foo(5), 6, "foo");
+ }
+
+ int Foo.foo(int n) { return n; }
+ Foo.new(int w) {}
+
+ int around(int n):
+ within(AdviceOnIntroduced) &&
+ (args(n) && execution(int foo(int))) {
+ int result = proceed(n);
+ return result+1;
+ }
+
+ before(): within(Foo) && execution(new(..)) {
+ //System.out.println("before new");
+ }
+}
+
+class Foo {
+}
diff --git a/tests/incrementalju/initialTests/classWAroundClosureRemoved/src/Main.java b/tests/incrementalju/initialTests/classWAroundClosureRemoved/src/Main.java
new file mode 100644
index 000000000..7c85f90c2
--- /dev/null
+++ b/tests/incrementalju/initialTests/classWAroundClosureRemoved/src/Main.java
@@ -0,0 +1,9 @@
+import org.aspectj.testing.Tester;
+
+public class Main {
+
+ public static void main(String[] args) {
+ Tester.checkFailed("Incremental compilation did not appear to (re)weave Main");
+ }
+
+} \ No newline at end of file
diff --git a/tests/incrementalju/initialTests/defaultPackage/changes/Main.30.java b/tests/incrementalju/initialTests/defaultPackage/changes/Main.30.java
new file mode 100644
index 000000000..a46687d78
--- /dev/null
+++ b/tests/incrementalju/initialTests/defaultPackage/changes/Main.30.java
@@ -0,0 +1,8 @@
+
+// default package
+
+public class Main {
+ public static void main (String[] args) {
+ new Target().run();
+ }
+}
diff --git a/tests/incrementalju/initialTests/defaultPackage/changes/Main.50.java b/tests/incrementalju/initialTests/defaultPackage/changes/Main.50.java
new file mode 100644
index 000000000..7616df98c
--- /dev/null
+++ b/tests/incrementalju/initialTests/defaultPackage/changes/Main.50.java
@@ -0,0 +1,7 @@
+
+// default package
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
diff --git a/tests/incrementalju/initialTests/defaultPackage/changes/Target.20.java b/tests/incrementalju/initialTests/defaultPackage/changes/Target.20.java
new file mode 100644
index 000000000..d67b06569
--- /dev/null
+++ b/tests/incrementalju/initialTests/defaultPackage/changes/Target.20.java
@@ -0,0 +1,9 @@
+
+// default package
+
+public class Target {
+ public static void main(String[] args) {
+ new Target().run();
+ }
+ void run() {}
+}
diff --git a/tests/incrementalju/initialTests/defaultPackage/changes/Target.delete.40.java b/tests/incrementalju/initialTests/defaultPackage/changes/Target.delete.40.java
new file mode 100644
index 000000000..187c8a8e6
--- /dev/null
+++ b/tests/incrementalju/initialTests/defaultPackage/changes/Target.delete.40.java
@@ -0,0 +1,2 @@
+
+// delete this file \ No newline at end of file
diff --git a/tests/incrementalju/initialTests/defaultPackage/src/Main.java b/tests/incrementalju/initialTests/defaultPackage/src/Main.java
new file mode 100644
index 000000000..66b7433e4
--- /dev/null
+++ b/tests/incrementalju/initialTests/defaultPackage/src/Main.java
@@ -0,0 +1,7 @@
+
+// default package
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
diff --git a/tests/incrementalju/initialTests/sourceAdded/src.20/main/Target.java b/tests/incrementalju/initialTests/sourceAdded/src.20/main/Target.java
new file mode 100644
index 000000000..985587eec
--- /dev/null
+++ b/tests/incrementalju/initialTests/sourceAdded/src.20/main/Target.java
@@ -0,0 +1,9 @@
+package main;
+
+import org.aspectj.testing.Tester;
+
+public class Target {
+ void run() {
+ Tester.event("Target.run()");
+ }
+}
diff --git a/tests/incrementalju/initialTests/sourceAdded/src.30/main/Main.java b/tests/incrementalju/initialTests/sourceAdded/src.30/main/Main.java
new file mode 100644
index 000000000..59564d39c
--- /dev/null
+++ b/tests/incrementalju/initialTests/sourceAdded/src.30/main/Main.java
@@ -0,0 +1,12 @@
+
+package main;
+
+import org.aspectj.testing.Tester;
+
+public class Main {
+ public static void main (String[] args) {
+ new Target().run();
+ Tester.expectEvent("Target.run()");
+ Tester.checkAllEvents();
+ }
+}
diff --git a/tests/incrementalju/initialTests/sourceAdded/src/main/Main.java b/tests/incrementalju/initialTests/sourceAdded/src/main/Main.java
new file mode 100644
index 000000000..185ed42bf
--- /dev/null
+++ b/tests/incrementalju/initialTests/sourceAdded/src/main/Main.java
@@ -0,0 +1,7 @@
+
+package main;
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
diff --git a/tests/incrementalju/initialTests/sourceDeleted/src.30/delete/Target.java b/tests/incrementalju/initialTests/sourceDeleted/src.30/delete/Target.java
new file mode 100644
index 000000000..1678b7055
--- /dev/null
+++ b/tests/incrementalju/initialTests/sourceDeleted/src.30/delete/Target.java
@@ -0,0 +1,7 @@
+
+package delete;
+
+public class Target {
+ static void run() {
+ }
+}
diff --git a/tests/incrementalju/initialTests/sourceDeleted/src/delete/DeleteMe.java b/tests/incrementalju/initialTests/sourceDeleted/src/delete/DeleteMe.java
new file mode 100644
index 000000000..9057235ff
--- /dev/null
+++ b/tests/incrementalju/initialTests/sourceDeleted/src/delete/DeleteMe.java
@@ -0,0 +1,7 @@
+
+package delete;
+
+public class DeleteMe {
+ static void run() {
+ }
+}
diff --git a/tests/incrementalju/initialTests/sourceDeleted/src/delete/Main.java b/tests/incrementalju/initialTests/sourceDeleted/src/delete/Main.java
new file mode 100644
index 000000000..e180e46c8
--- /dev/null
+++ b/tests/incrementalju/initialTests/sourceDeleted/src/delete/Main.java
@@ -0,0 +1,8 @@
+
+package delete;
+
+public class Main {
+ public static void main(String[] args) {
+ Target.run();
+ }
+}
diff --git a/tests/incrementalju/initialTests/sourceDeleted/src/delete/Target.java b/tests/incrementalju/initialTests/sourceDeleted/src/delete/Target.java
new file mode 100644
index 000000000..a19401904
--- /dev/null
+++ b/tests/incrementalju/initialTests/sourceDeleted/src/delete/Target.java
@@ -0,0 +1,8 @@
+
+package delete;
+
+public class Target {
+ static void run() {
+ DeleteMe.run(); // CE 6 after DeleteMe deleted
+ }
+}