From 844a0518daf0c0c83a61b58cc1f1107941f1b4c2 Mon Sep 17 00:00:00 2001 From: wisberg Date: Mon, 10 Mar 2003 23:25:43 +0000 Subject: [PATCH] stringliteral tests - unreproduced verify error from incremental compilation of change only to a sttring literal. --- .../stringliteral/src/RunInjarMains.30.java | 8 ++++++++ .../stringliteral/src/TraceMains.java | 16 ++++++++++++++++ .../stringliteral/src/packageOne/Main.20.java | 16 ++++++++++++++++ .../stringliteral/src/packageOne/Main.java | 15 +++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 tests/incremental/stringliteral/src/RunInjarMains.30.java create mode 100644 tests/incremental/stringliteral/src/TraceMains.java create mode 100644 tests/incremental/stringliteral/src/packageOne/Main.20.java create mode 100644 tests/incremental/stringliteral/src/packageOne/Main.java diff --git a/tests/incremental/stringliteral/src/RunInjarMains.30.java b/tests/incremental/stringliteral/src/RunInjarMains.30.java new file mode 100644 index 000000000..586ff756e --- /dev/null +++ b/tests/incremental/stringliteral/src/RunInjarMains.30.java @@ -0,0 +1,8 @@ + +public aspect RunInjarMains { + before() : execution(static void packageOne.main(String[])) { + String[] args = new String[0]; + InjarOneMain.main(args); + InjarTwoMain.main(args); + } +} \ No newline at end of file diff --git a/tests/incremental/stringliteral/src/TraceMains.java b/tests/incremental/stringliteral/src/TraceMains.java new file mode 100644 index 000000000..3c9a49bab --- /dev/null +++ b/tests/incremental/stringliteral/src/TraceMains.java @@ -0,0 +1,16 @@ + +import org.aspectj.testing.Tester; +import org.aspectj.lang.JoinPoint; + +public aspect TraceMains { + private static String className(JoinPoint.StaticPart jp) { + return jp.getSignature().getDeclaringType().getName(); + } + before() : execution(static void main(String[])) { + Tester.event("before main " + className(thisJoinPointStaticPart)); + } + after() returning: execution(static void main(String[])) { + Tester.event("after main " + className(thisJoinPointStaticPart)); + } + +} \ No newline at end of file diff --git a/tests/incremental/stringliteral/src/packageOne/Main.20.java b/tests/incremental/stringliteral/src/packageOne/Main.20.java new file mode 100644 index 000000000..b2848f051 --- /dev/null +++ b/tests/incremental/stringliteral/src/packageOne/Main.20.java @@ -0,0 +1,16 @@ + +package packageOne; + +import org.aspectj.testing.Tester; + +public class Main { + public static void main(String[] args) { + for (int i = 0; i < args.length; i++) { + Tester.expectEvent(args[i]); + } + Tester.event("in longer packageOne.Main.main(..)"); + Tester.checkAllEvents(); + } +} + + diff --git a/tests/incremental/stringliteral/src/packageOne/Main.java b/tests/incremental/stringliteral/src/packageOne/Main.java new file mode 100644 index 000000000..d8315399f --- /dev/null +++ b/tests/incremental/stringliteral/src/packageOne/Main.java @@ -0,0 +1,15 @@ + +package packageOne; + +import org.aspectj.testing.Tester; + +public class Main { + public static void main(String[] args) { + for (int i = 0; i < args.length; i++) { + Tester.expectEvent(args[i]); + } + Tester.event("in packageOne.Main.main(..)"); + Tester.checkAllEvents(); + } +} + -- 2.39.5