From 07680d269ec452077f219ce08f80e6998e1275c3 Mon Sep 17 00:00:00 2001 From: Hamza REMMAL Date: Tue, 27 Feb 2024 19:16:07 +0100 Subject: [PATCH] Fix test directive [Cherry-picked 84024e98ef2952e76434e5b955c69385d319584d] --- tests/neg/i18533.check | 8 ++++---- .../i18533/{non-SCALA_ONLY.java => Non_SCALA_ONLY.java} | 2 +- tests/pos/i18533/Cat.java | 2 +- tests/pos/i18533/Dog.java | 1 - tests/pos/i18533/Pet.java | 1 - 5 files changed, 6 insertions(+), 8 deletions(-) rename tests/neg/i18533/{non-SCALA_ONLY.java => Non_SCALA_ONLY.java} (98%) diff --git a/tests/neg/i18533.check b/tests/neg/i18533.check index 0e117edc3195..ed5027f01ac7 100644 --- a/tests/neg/i18533.check +++ b/tests/neg/i18533.check @@ -1,8 +1,8 @@ +-- Error: tests/neg/i18533/Non_SCALA_ONLY.java:4:7 --------------------------------------------------------------------- +4 |public non class Test { // error + | ^^^ + | Identifier 'non' is not allowed here -- Error: tests/neg/i18533/Pet_SCALA_ONLY.java:3:10 -------------------------------------------------------------------- 3 |class Pet permits Cat { // error | ^^^^^^^ | A type declaration that has a permits clause should have a sealed modifier --- Error: tests/neg/i18533/non-SCALA_ONLY.java:4:7 --------------------------------------------------------------------- -4 |public non class Test { // error - | ^^^ - | Identifier 'non' is not allowed here diff --git a/tests/neg/i18533/non-SCALA_ONLY.java b/tests/neg/i18533/Non_SCALA_ONLY.java similarity index 98% rename from tests/neg/i18533/non-SCALA_ONLY.java rename to tests/neg/i18533/Non_SCALA_ONLY.java index be6aef65da13..cde3b72e12d5 100644 --- a/tests/neg/i18533/non-SCALA_ONLY.java +++ b/tests/neg/i18533/Non_SCALA_ONLY.java @@ -3,4 +3,4 @@ // Special test for the non-sealed trick (See JavaParsers.scala::modifiers) public non class Test { // error -} \ No newline at end of file +} diff --git a/tests/pos/i18533/Cat.java b/tests/pos/i18533/Cat.java index 33cdd99949bb..394f8de37c13 100644 --- a/tests/pos/i18533/Cat.java +++ b/tests/pos/i18533/Cat.java @@ -1,5 +1,5 @@ //> using javacOpt --enable-preview --source 17 -//> test: -jvm 17+ +// test: -jvm 17+ package i18533; diff --git a/tests/pos/i18533/Dog.java b/tests/pos/i18533/Dog.java index 0b10b9f06c27..73d137313dc7 100644 --- a/tests/pos/i18533/Dog.java +++ b/tests/pos/i18533/Dog.java @@ -1,5 +1,4 @@ //> using javacOpt --enable-preview --source 17 -//> test: -jvm 17+ package i18533; diff --git a/tests/pos/i18533/Pet.java b/tests/pos/i18533/Pet.java index 0985aa1f957f..990c4fbabd70 100644 --- a/tests/pos/i18533/Pet.java +++ b/tests/pos/i18533/Pet.java @@ -1,5 +1,4 @@ //> using javacOpt --enable-preview --source 17 -//> test: -jvm 17+ package i18533;