From c2bcc9d1c7f47299055bf68c4f1ae32f5aa9553a Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 31 Mar 2004 00:38:51 +0000 Subject: [PATCH] dir-changes tests --- tests/ajcHarnessTests.xml | 99 +++++++++++++++++++ tests/harness/DirChangesTest.java | 16 +++ .../dirchanges-inc/src/Changed.20.java | 11 +++ tests/harness/dirchanges-inc/src/Changed.java | 12 +++ .../dirchanges-inc/src/Removed.delete.20.java | 7 ++ tests/harness/dirchanges-inc/src/Removed.java | 7 ++ .../harness/dirchanges-inc/src/Unchanged.java | 6 ++ 7 files changed, 158 insertions(+) create mode 100644 tests/harness/DirChangesTest.java create mode 100644 tests/harness/dirchanges-inc/src/Changed.20.java create mode 100644 tests/harness/dirchanges-inc/src/Changed.java create mode 100644 tests/harness/dirchanges-inc/src/Removed.delete.20.java create mode 100644 tests/harness/dirchanges-inc/src/Removed.java create mode 100644 tests/harness/dirchanges-inc/src/Unchanged.java diff --git a/tests/ajcHarnessTests.xml b/tests/ajcHarnessTests.xml index f90eaabdc..304552eff 100644 --- a/tests/ajcHarnessTests.xml +++ b/tests/ajcHarnessTests.xml @@ -341,6 +341,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/harness/DirChangesTest.java b/tests/harness/DirChangesTest.java new file mode 100644 index 000000000..a305cd220 --- /dev/null +++ b/tests/harness/DirChangesTest.java @@ -0,0 +1,16 @@ +import org.aspectj.testing.Tester; + +public class DirChangesTest { + public static void main (String[] args) { + Tester.check(true, "ok"); + } + static class Nested { + static int meaningOfLife = 42; + } + class Inner { + int meaningOfLife = 42; + } + +} + + diff --git a/tests/harness/dirchanges-inc/src/Changed.20.java b/tests/harness/dirchanges-inc/src/Changed.20.java new file mode 100644 index 000000000..6d4871531 --- /dev/null +++ b/tests/harness/dirchanges-inc/src/Changed.20.java @@ -0,0 +1,11 @@ + + +public class Changed { + public static void main(String[] args) { + Unchanged.main(args); + String sargs = java.util.Arrays.asList(args).toString(); + if (!"[second]".equals(sargs)) { + throw new Error("expected args [second] but got " + sargs); + } + } +} \ No newline at end of file diff --git a/tests/harness/dirchanges-inc/src/Changed.java b/tests/harness/dirchanges-inc/src/Changed.java new file mode 100644 index 000000000..7c6484ec8 --- /dev/null +++ b/tests/harness/dirchanges-inc/src/Changed.java @@ -0,0 +1,12 @@ + +import org.aspectj.testing.Tester; + +public class Changed { + public static void main(String[] args) { + Unchanged.main(args); + String sargs = java.util.Arrays.asList(args).toString(); + if (!"[first]".equals(sargs)) { + throw new Error("expected args [first] but got " + sargs); + } + } +} \ No newline at end of file diff --git a/tests/harness/dirchanges-inc/src/Removed.delete.20.java b/tests/harness/dirchanges-inc/src/Removed.delete.20.java new file mode 100644 index 000000000..0b430c163 --- /dev/null +++ b/tests/harness/dirchanges-inc/src/Removed.delete.20.java @@ -0,0 +1,7 @@ + + +public class Removed { + public static void main(String[] args) { + Changed.main(args); + } +} \ No newline at end of file diff --git a/tests/harness/dirchanges-inc/src/Removed.java b/tests/harness/dirchanges-inc/src/Removed.java new file mode 100644 index 000000000..0b430c163 --- /dev/null +++ b/tests/harness/dirchanges-inc/src/Removed.java @@ -0,0 +1,7 @@ + + +public class Removed { + public static void main(String[] args) { + Changed.main(args); + } +} \ No newline at end of file diff --git a/tests/harness/dirchanges-inc/src/Unchanged.java b/tests/harness/dirchanges-inc/src/Unchanged.java new file mode 100644 index 000000000..807c14bf7 --- /dev/null +++ b/tests/harness/dirchanges-inc/src/Unchanged.java @@ -0,0 +1,6 @@ + + +public class Unchanged { + public static void main(String[] args) { + } +} \ No newline at end of file -- 2.39.5