Restructure java21 test
Bug: b/344503104
Change-Id: I3ef10524f30315d36a2d613e07e38fa6a7f4e6f9
diff --git a/d8_r8/test_modules/tests_java_21/build.gradle.kts b/d8_r8/test_modules/tests_java_21/build.gradle.kts
index 71702b7..f1467ff 100644
--- a/d8_r8/test_modules/tests_java_21/build.gradle.kts
+++ b/d8_r8/test_modules/tests_java_21/build.gradle.kts
@@ -14,7 +14,7 @@
java {
sourceSets.test.configure {
- java.srcDir(root.resolveAll("src", "test", "examplesJava21"))
+ java.srcDir(root.resolveAll("src", "test", "java21"))
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
@@ -31,9 +31,6 @@
implementation(projectTask("main", "processResources").outputs.files)
}
-// We just need to register the examples jars for it to be referenced by other modules.
-val buildExampleJars = buildExampleJars("examplesJava21")
-
tasks {
withType<JavaCompile> {
dependsOn(gradle.includedBuild("shared").task(":downloadDeps"))
@@ -51,7 +48,7 @@
// This should be
// layout.buildDirectory.dir("classes/java/test").get().toString()
// once the use of 'buildExampleJars' above is removed.
- getRoot().resolveAll("build", "test", "examplesJava21", "classes"))
+ getRoot().resolveAll("build", "test", "java21", "classes"))
systemProperty("TESTBASE_DATA_LOCATION",
testbaseJavaCompileTask.outputs.files.getAsPath().split(File.pathSeparator)[0])
}
diff --git a/d8_r8/test_modules/tests_java_8/build.gradle.kts b/d8_r8/test_modules/tests_java_8/build.gradle.kts
index 4aef7cf..b2f8b87 100644
--- a/d8_r8/test_modules/tests_java_8/build.gradle.kts
+++ b/d8_r8/test_modules/tests_java_8/build.gradle.kts
@@ -63,7 +63,6 @@
projectTask("tests_java_10", getExampleJarsTaskName("examplesJava10")),
projectTask("tests_java_11", getExampleJarsTaskName("examplesJava11")),
projectTask("tests_java_17", getExampleJarsTaskName("examplesJava17")),
- projectTask("tests_java_21", getExampleJarsTaskName("examplesJava21")),
)
fun testDependencies() : FileCollection {
diff --git a/src/test/examplesJava21/autocloseable/AutoCloseableDesugaringClassesPresentAtKitKatTest.java b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableDesugaringClassesPresentAtKitKatTest.java
similarity index 97%
rename from src/test/examplesJava21/autocloseable/AutoCloseableDesugaringClassesPresentAtKitKatTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableDesugaringClassesPresentAtKitKatTest.java
index f356264..fdd9e74 100644
--- a/src/test/examplesJava21/autocloseable/AutoCloseableDesugaringClassesPresentAtKitKatTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableDesugaringClassesPresentAtKitKatTest.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package autocloseable;
+package com.android.tools.r8.jdk21.autocloseable;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTest.java b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTest.java
similarity index 99%
rename from src/test/examplesJava21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTest.java
index eed8542..2d40bc7 100644
--- a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTest.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package autocloseable;
+package com.android.tools.r8.jdk21.autocloseable;
import static com.android.tools.r8.desugar.AutoCloseableAndroidLibraryFileData.compileAutoCloseableAndroidLibraryClasses;
import static com.android.tools.r8.desugar.AutoCloseableAndroidLibraryFileData.getAutoCloseableAndroidClassData;
diff --git a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTwrTest.java b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTwrTest.java
similarity index 99%
rename from src/test/examplesJava21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTwrTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTwrTest.java
index c6b4632..b97895e 100644
--- a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTwrTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterAndroidSubtypeTwrTest.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package autocloseable;
+package com.android.tools.r8.jdk21.autocloseable;
import static com.android.tools.r8.desugar.AutoCloseableAndroidLibraryFileData.compileAutoCloseableAndroidLibraryClasses;
import static com.android.tools.r8.desugar.AutoCloseableAndroidLibraryFileData.getAutoCloseableAndroidClassData;
diff --git a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterAndroidTest.java b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterAndroidTest.java
similarity index 98%
rename from src/test/examplesJava21/autocloseable/AutoCloseableRetargeterAndroidTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterAndroidTest.java
index 885be86..7d8aac2 100644
--- a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterAndroidTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterAndroidTest.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package autocloseable;
+package com.android.tools.r8.jdk21.autocloseable;
import static com.android.tools.r8.desugar.AutoCloseableAndroidLibraryFileData.compileAutoCloseableAndroidLibraryClasses;
import static com.android.tools.r8.desugar.AutoCloseableAndroidLibraryFileData.getAutoCloseableAndroidClassData;
diff --git a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTest.java b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTest.java
similarity index 99%
rename from src/test/examplesJava21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTest.java
index f80a7a5..517f276 100644
--- a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTest.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package autocloseable;
+package com.android.tools.r8.jdk21.autocloseable;
import static com.android.tools.r8.desugar.AutoCloseableAndroidLibraryFileData.getAutoCloseableAndroidClassData;
import static org.junit.Assume.assumeTrue;
diff --git a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTwrTest.java b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTwrTest.java
similarity index 99%
rename from src/test/examplesJava21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTwrTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTwrTest.java
index 5a41819..9ecfc4c 100644
--- a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTwrTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterExecutorServiceSubtypeTwrTest.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package autocloseable;
+package com.android.tools.r8.jdk21.autocloseable;
import static com.android.tools.r8.desugar.AutoCloseableAndroidLibraryFileData.getAutoCloseableAndroidClassData;
import static org.junit.Assert.assertTrue;
diff --git a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterExecutorServiceTest.java b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterExecutorServiceTest.java
similarity index 98%
rename from src/test/examplesJava21/autocloseable/AutoCloseableRetargeterExecutorServiceTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterExecutorServiceTest.java
index 5a47d26..b636b85 100644
--- a/src/test/examplesJava21/autocloseable/AutoCloseableRetargeterExecutorServiceTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/autocloseable/AutoCloseableRetargeterExecutorServiceTest.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package autocloseable;
+package com.android.tools.r8.jdk21.autocloseable;
import static com.android.tools.r8.desugar.AutoCloseableAndroidLibraryFileData.getAutoCloseableAndroidClassData;
diff --git a/src/test/examplesJava21/backport/MathJava21Test.java b/src/test/java21/com/android/tools/r8/jdk21/backport/MathJava21Test.java
similarity index 99%
rename from src/test/examplesJava21/backport/MathJava21Test.java
rename to src/test/java21/com/android/tools/r8/jdk21/backport/MathJava21Test.java
index 1c34ed9..18639b6 100644
--- a/src/test/examplesJava21/backport/MathJava21Test.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/backport/MathJava21Test.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package backport;
+package com.android.tools.r8.jdk21.backport;
import com.android.tools.r8.TestParameters;
import com.android.tools.r8.TestRuntime.CfVm;
diff --git a/src/test/examplesJava21/backport/StrictMathJava21Test.java b/src/test/java21/com/android/tools/r8/jdk21/backport/StrictMathJava21Test.java
similarity index 99%
rename from src/test/examplesJava21/backport/StrictMathJava21Test.java
rename to src/test/java21/com/android/tools/r8/jdk21/backport/StrictMathJava21Test.java
index e39d818..68940cc 100644
--- a/src/test/examplesJava21/backport/StrictMathJava21Test.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/backport/StrictMathJava21Test.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package backport;
+package com.android.tools.r8.jdk21.backport;
import com.android.tools.r8.TestParameters;
import com.android.tools.r8.TestRuntime.CfVm;
diff --git a/src/test/examplesJava21/desugaredlibrary/Java21CollectionTest.java b/src/test/java21/com/android/tools/r8/jdk21/desugaredlibrary/Java21CollectionTest.java
similarity index 98%
rename from src/test/examplesJava21/desugaredlibrary/Java21CollectionTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/desugaredlibrary/Java21CollectionTest.java
index d86ef1d..c3c3cb1 100644
--- a/src/test/examplesJava21/desugaredlibrary/Java21CollectionTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/desugaredlibrary/Java21CollectionTest.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package desugaredlibrary;
+package com.android.tools.r8.jdk21.desugaredlibrary;
import static com.android.tools.r8.desugar.desugaredlibrary.test.CompilationSpecification.D8_L8DEBUG;
import static com.android.tools.r8.desugar.desugaredlibrary.test.CompilationSpecification.DEFAULT_SPECIFICATIONS;
diff --git a/src/test/examplesJava21/desugaredlibrary/MapMultiTest.java b/src/test/java21/com/android/tools/r8/jdk21/desugaredlibrary/MapMultiTest.java
similarity index 98%
rename from src/test/examplesJava21/desugaredlibrary/MapMultiTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/desugaredlibrary/MapMultiTest.java
index cd3203b..04d2312 100644
--- a/src/test/examplesJava21/desugaredlibrary/MapMultiTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/desugaredlibrary/MapMultiTest.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package desugaredlibrary;
+package com.android.tools.r8.jdk21.desugaredlibrary;
import static com.android.tools.r8.desugar.desugaredlibrary.test.CompilationSpecification.D8_L8DEBUG;
import static com.android.tools.r8.desugar.desugaredlibrary.test.CompilationSpecification.DEFAULT_SPECIFICATIONS;
diff --git a/src/test/examplesJava21/jdk21/ir/optimize/interfaces/CastWithMultipleBoundsJavacBytecodeTest.java b/src/test/java21/com/android/tools/r8/jdk21/interfaces/CastWithMultipleBoundsJavacBytecodeTest.java
similarity index 98%
rename from src/test/examplesJava21/jdk21/ir/optimize/interfaces/CastWithMultipleBoundsJavacBytecodeTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/interfaces/CastWithMultipleBoundsJavacBytecodeTest.java
index 0b73ede..bef158d 100644
--- a/src/test/examplesJava21/jdk21/ir/optimize/interfaces/CastWithMultipleBoundsJavacBytecodeTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/interfaces/CastWithMultipleBoundsJavacBytecodeTest.java
@@ -1,7 +1,7 @@
// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package jdk21.ir.optimize.interfaces;
+package com.android.tools.r8.jdk21.interfaces;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/examplesJava21/jdk8272564/A.java b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/A.java
similarity index 83%
rename from src/test/examplesJava21/jdk8272564/A.java
rename to src/test/java21/com/android/tools/r8/jdk21/jdk8272564/A.java
index f548fc0..49e59c2 100644
--- a/src/test/examplesJava21/jdk8272564/A.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/A.java
@@ -2,6 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package jdk8272564;
+package com.android.tools.r8.jdk21.jdk8272564;
public class A implements I {}
diff --git a/src/test/examplesJava21/jdk8272564/B.java b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/B.java
similarity index 83%
rename from src/test/examplesJava21/jdk8272564/B.java
rename to src/test/java21/com/android/tools/r8/jdk21/jdk8272564/B.java
index 678d2d5..0a4177d 100644
--- a/src/test/examplesJava21/jdk8272564/B.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/B.java
@@ -2,6 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package jdk8272564;
+package com.android.tools.r8.jdk21.jdk8272564;
public class B implements J {}
diff --git a/src/test/examplesJava21/jdk8272564/C.java b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/C.java
similarity index 83%
rename from src/test/examplesJava21/jdk8272564/C.java
rename to src/test/java21/com/android/tools/r8/jdk21/jdk8272564/C.java
index 3308d8e..7ef174c 100644
--- a/src/test/examplesJava21/jdk8272564/C.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/C.java
@@ -2,6 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package jdk8272564;
+package com.android.tools.r8.jdk21.jdk8272564;
public class C implements K {}
diff --git a/src/test/examplesJava21/jdk8272564/I.java b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/I.java
similarity index 87%
rename from src/test/examplesJava21/jdk8272564/I.java
rename to src/test/java21/com/android/tools/r8/jdk21/jdk8272564/I.java
index 1694eea..744b77f 100644
--- a/src/test/examplesJava21/jdk8272564/I.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/I.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package jdk8272564;
+package com.android.tools.r8.jdk21.jdk8272564;
interface I {
public String toString();
diff --git a/src/test/examplesJava21/jdk8272564/J.java b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/J.java
similarity index 83%
rename from src/test/examplesJava21/jdk8272564/J.java
rename to src/test/java21/com/android/tools/r8/jdk21/jdk8272564/J.java
index 38b2551..2a3cf16 100644
--- a/src/test/examplesJava21/jdk8272564/J.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/J.java
@@ -2,6 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package jdk8272564;
+package com.android.tools.r8.jdk21.jdk8272564;
interface J extends I {}
diff --git a/src/test/examplesJava21/jdk8272564/Jdk8272564InvalidCode.java b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/Jdk8272564InvalidCode.java
similarity index 98%
rename from src/test/examplesJava21/jdk8272564/Jdk8272564InvalidCode.java
rename to src/test/java21/com/android/tools/r8/jdk21/jdk8272564/Jdk8272564InvalidCode.java
index 8800345..ba91e60 100644
--- a/src/test/examplesJava21/jdk8272564/Jdk8272564InvalidCode.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/Jdk8272564InvalidCode.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package jdk8272564;
+package com.android.tools.r8.jdk21.jdk8272564;
import static org.junit.Assume.assumeTrue;
diff --git a/src/test/examplesJava21/jdk8272564/Jdk8272564Test.java b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/Jdk8272564Test.java
similarity index 98%
rename from src/test/examplesJava21/jdk8272564/Jdk8272564Test.java
rename to src/test/java21/com/android/tools/r8/jdk21/jdk8272564/Jdk8272564Test.java
index d5a932a..8b2382e 100644
--- a/src/test/examplesJava21/jdk8272564/Jdk8272564Test.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/Jdk8272564Test.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package jdk8272564;
+package com.android.tools.r8.jdk21.jdk8272564;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
diff --git a/src/test/examplesJava21/jdk8272564/K.java b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/K.java
similarity index 82%
rename from src/test/examplesJava21/jdk8272564/K.java
rename to src/test/java21/com/android/tools/r8/jdk21/jdk8272564/K.java
index 726f781..83b9c81 100644
--- a/src/test/examplesJava21/jdk8272564/K.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/K.java
@@ -2,6 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package jdk8272564;
+package com.android.tools.r8.jdk21.jdk8272564;
interface K {}
diff --git a/src/test/examplesJava21/jdk8272564/Main.java b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/Main.java
similarity index 95%
rename from src/test/examplesJava21/jdk8272564/Main.java
rename to src/test/java21/com/android/tools/r8/jdk21/jdk8272564/Main.java
index c5963fd..6b7da64 100644
--- a/src/test/examplesJava21/jdk8272564/Main.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/jdk8272564/Main.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package jdk8272564;
+package com.android.tools.r8.jdk21.jdk8272564;
public class Main {
// From javac in JDK-18 all of the following three invokes of toString are compiled to
diff --git a/src/test/examplesJava21/switchpatternmatching/EnumLessCasesAtRuntimeSwitchTest.java b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumLessCasesAtRuntimeSwitchTest.java
similarity index 98%
rename from src/test/examplesJava21/switchpatternmatching/EnumLessCasesAtRuntimeSwitchTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumLessCasesAtRuntimeSwitchTest.java
index f7045a5..4b950eb 100644
--- a/src/test/examplesJava21/switchpatternmatching/EnumLessCasesAtRuntimeSwitchTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumLessCasesAtRuntimeSwitchTest.java
@@ -1,7 +1,7 @@
// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package switchpatternmatching;
+package com.android.tools.r8.jdk21.switchpatternmatching;
import static com.android.tools.r8.desugar.switchpatternmatching.SwitchTestHelper.hasJdk21EnumSwitch;
import static com.android.tools.r8.desugar.switchpatternmatching.SwitchTestHelper.hasJdk21TypeSwitch;
diff --git a/src/test/examplesJava21/switchpatternmatching/EnumMoreCasesAtRuntimeSwitchTest.java b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumMoreCasesAtRuntimeSwitchTest.java
similarity index 98%
rename from src/test/examplesJava21/switchpatternmatching/EnumMoreCasesAtRuntimeSwitchTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumMoreCasesAtRuntimeSwitchTest.java
index 1a79f51..961d65d 100644
--- a/src/test/examplesJava21/switchpatternmatching/EnumMoreCasesAtRuntimeSwitchTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumMoreCasesAtRuntimeSwitchTest.java
@@ -1,7 +1,7 @@
// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package switchpatternmatching;
+package com.android.tools.r8.jdk21.switchpatternmatching;
import static com.android.tools.r8.desugar.switchpatternmatching.SwitchTestHelper.desugarMatchException;
import static com.android.tools.r8.desugar.switchpatternmatching.SwitchTestHelper.hasJdk21EnumSwitch;
diff --git a/src/test/examplesJava21/switchpatternmatching/EnumSwitchTest.java b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumSwitchTest.java
similarity index 94%
rename from src/test/examplesJava21/switchpatternmatching/EnumSwitchTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumSwitchTest.java
index 774a285..34d6a44 100644
--- a/src/test/examplesJava21/switchpatternmatching/EnumSwitchTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumSwitchTest.java
@@ -1,7 +1,7 @@
// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package switchpatternmatching;
+package com.android.tools.r8.jdk21.switchpatternmatching;
import static com.android.tools.r8.desugar.switchpatternmatching.SwitchTestHelper.desugarMatchException;
import static com.android.tools.r8.desugar.switchpatternmatching.SwitchTestHelper.hasJdk21TypeSwitch;
@@ -72,14 +72,16 @@
.transformTypeInsnInMethod(
"getD",
(opcode, type, visitor) ->
- visitor.visitTypeInsn(opcode, "switchpatternmatching/EnumSwitchTest$D"))
+ visitor.visitTypeInsn(
+ opcode,
+ "com/android/tools/r8/jdk21/switchpatternmatching/EnumSwitchTest$D"))
.transformMethodInsnInMethod(
"getD",
(opcode, owner, name, descriptor, isInterface, visitor) -> {
assert name.equals("<init>");
visitor.visitMethodInsn(
opcode,
- "switchpatternmatching/EnumSwitchTest$D",
+ "com/android/tools/r8/jdk21/switchpatternmatching/EnumSwitchTest$D",
name,
descriptor,
isInterface);
diff --git a/src/test/examplesJava21/switchpatternmatching/EnumSwitchUsingEnumSwitchBootstrapMethodTest.java b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumSwitchUsingEnumSwitchBootstrapMethodTest.java
similarity index 98%
rename from src/test/examplesJava21/switchpatternmatching/EnumSwitchUsingEnumSwitchBootstrapMethodTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumSwitchUsingEnumSwitchBootstrapMethodTest.java
index 5954a9d..41d5843 100644
--- a/src/test/examplesJava21/switchpatternmatching/EnumSwitchUsingEnumSwitchBootstrapMethodTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/EnumSwitchUsingEnumSwitchBootstrapMethodTest.java
@@ -1,7 +1,7 @@
// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package switchpatternmatching;
+package com.android.tools.r8.jdk21.switchpatternmatching;
import static com.android.tools.r8.desugar.switchpatternmatching.SwitchTestHelper.hasJdk21EnumSwitch;
import static org.junit.Assert.assertTrue;
diff --git a/src/test/examplesJava21/switchpatternmatching/StringSwitchTest.java b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/StringSwitchTest.java
similarity index 98%
rename from src/test/examplesJava21/switchpatternmatching/StringSwitchTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/StringSwitchTest.java
index 3298ab2..e227a6c 100644
--- a/src/test/examplesJava21/switchpatternmatching/StringSwitchTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/StringSwitchTest.java
@@ -1,7 +1,7 @@
// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package switchpatternmatching;
+package com.android.tools.r8.jdk21.switchpatternmatching;
import static com.android.tools.r8.desugar.switchpatternmatching.SwitchTestHelper.hasJdk21TypeSwitch;
import static org.junit.Assert.assertTrue;
diff --git a/src/test/examplesJava21/switchpatternmatching/TypeSwitchMissingClassTest.java b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/TypeSwitchMissingClassTest.java
similarity index 98%
rename from src/test/examplesJava21/switchpatternmatching/TypeSwitchMissingClassTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/TypeSwitchMissingClassTest.java
index 995abab..d235652 100644
--- a/src/test/examplesJava21/switchpatternmatching/TypeSwitchMissingClassTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/TypeSwitchMissingClassTest.java
@@ -1,7 +1,7 @@
// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package switchpatternmatching;
+package com.android.tools.r8.jdk21.switchpatternmatching;
import static com.android.tools.r8.desugar.switchpatternmatching.SwitchTestHelper.hasJdk21TypeSwitch;
import static org.junit.Assert.assertTrue;
diff --git a/src/test/examplesJava21/switchpatternmatching/TypeSwitchTest.java b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/TypeSwitchTest.java
similarity index 98%
rename from src/test/examplesJava21/switchpatternmatching/TypeSwitchTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/TypeSwitchTest.java
index d4c2bfe..e8b0da0 100644
--- a/src/test/examplesJava21/switchpatternmatching/TypeSwitchTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/switchpatternmatching/TypeSwitchTest.java
@@ -1,7 +1,7 @@
// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package switchpatternmatching;
+package com.android.tools.r8.jdk21.switchpatternmatching;
import static com.android.tools.r8.desugar.switchpatternmatching.SwitchTestHelper.hasJdk21TypeSwitch;
import static org.junit.Assert.assertTrue;
diff --git a/src/test/examplesJava21/twr/ExecutorServiceBackportTest.java b/src/test/java21/com/android/tools/r8/jdk21/twr/ExecutorServiceBackportTest.java
similarity index 98%
rename from src/test/examplesJava21/twr/ExecutorServiceBackportTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/twr/ExecutorServiceBackportTest.java
index a38220c..37dd2be 100644
--- a/src/test/examplesJava21/twr/ExecutorServiceBackportTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/twr/ExecutorServiceBackportTest.java
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package twr;
+package com.android.tools.r8.jdk21.twr;
import static com.android.tools.r8.desugar.AutoCloseableAndroidLibraryFileData.compileAutoCloseableAndroidLibraryClasses;
import static com.android.tools.r8.desugar.AutoCloseableAndroidLibraryFileData.getAutoCloseableAndroidClassData;
diff --git a/src/test/examplesJava21/twr/LookUpCloseResourceTest.java b/src/test/java21/com/android/tools/r8/jdk21/twr/LookUpCloseResourceTest.java
similarity index 99%
rename from src/test/examplesJava21/twr/LookUpCloseResourceTest.java
rename to src/test/java21/com/android/tools/r8/jdk21/twr/LookUpCloseResourceTest.java
index 06d8322..7e7a721 100644
--- a/src/test/examplesJava21/twr/LookUpCloseResourceTest.java
+++ b/src/test/java21/com/android/tools/r8/jdk21/twr/LookUpCloseResourceTest.java
@@ -1,7 +1,7 @@
// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-package twr;
+package com.android.tools.r8.jdk21.twr;
import com.android.tools.r8.TestBase;
import com.android.tools.r8.TestParameters;