diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-12-11 09:13:40 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-12-11 03:38:37 +0100 |
commit | 05de3c05c3619c0aacd5b47a80ac1c6767deb39c (patch) | |
tree | b87ceda18dcf6ab02c3a01476a46043cf1d7e19f /tests/features1921 | |
parent | 8c72d2da438d06885d48ffd3ade30b89a782b874 (diff) | |
download | aspectj-05de3c05c3619c0aacd5b47a80ac1c6767deb39c.tar.gz aspectj-05de3c05c3619c0aacd5b47a80ac1c6767deb39c.zip |
Add tests for Java 21 unnamed classes and instance methods
TODO: Activate the unnamed class test after
https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1106 is done.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests/features1921')
3 files changed, 28 insertions, 0 deletions
diff --git a/tests/features1921/java21/NamedAspectWithSimpleMainMethodPreview1.aj b/tests/features1921/java21/NamedAspectWithSimpleMainMethodPreview1.aj new file mode 100644 index 000000000..337f1b9b1 --- /dev/null +++ b/tests/features1921/java21/NamedAspectWithSimpleMainMethodPreview1.aj @@ -0,0 +1,11 @@ +/** + * Example according to <a href="https://openjdk.org/jeps/445">JEP 445</a> + * <p> + * This actually does not require any compiler changes and should be compilable without {@code --enable-preview}. + * It merely serves as a test case for the JVM launcher protocol. + */ +public aspect NamedAspectWithSimpleMainMethodPreview1 { + void main() { + System.out.println("Hello world!"); + } +} diff --git a/tests/features1921/java21/NamedClassWithSimpleMainMethodPreview1.java b/tests/features1921/java21/NamedClassWithSimpleMainMethodPreview1.java new file mode 100644 index 000000000..d6fced008 --- /dev/null +++ b/tests/features1921/java21/NamedClassWithSimpleMainMethodPreview1.java @@ -0,0 +1,11 @@ +/** + * Example according to <a href="https://openjdk.org/jeps/445">JEP 445</a> + * <p> + * This actually does not require any compiler changes and should be compilable without {@code --enable-preview}. + * It merely serves as a test case for the JVM launcher protocol. + */ +public class NamedClassWithSimpleMainMethodPreview1 { + void main() { + System.out.println("Hello world!"); + } +} diff --git a/tests/features1921/java21/UnnamedClassWithSimpleMainMethodPreview1.java b/tests/features1921/java21/UnnamedClassWithSimpleMainMethodPreview1.java new file mode 100644 index 000000000..a9ecd1d7e --- /dev/null +++ b/tests/features1921/java21/UnnamedClassWithSimpleMainMethodPreview1.java @@ -0,0 +1,6 @@ +/** + * Example according to <a href="https://openjdk.org/jeps/445">JEP 445</a> + */ +void main() { + System.out.println("Hello world!"); +} |