Fix import and change comment
- include sgjesse review from other cl
Change-Id: Ie9cb53b2d8c969af94e5fb8b2ae2e2ec2b4c26a4
diff --git a/src/test/java/com/android/tools/r8/cfmethodgeneration/TypeSwitchMethods.java b/src/test/java/com/android/tools/r8/cfmethodgeneration/TypeSwitchMethods.java
index 53ae439..c932506 100644
--- a/src/test/java/com/android/tools/r8/cfmethodgeneration/TypeSwitchMethods.java
+++ b/src/test/java/com/android/tools/r8/cfmethodgeneration/TypeSwitchMethods.java
@@ -6,6 +6,7 @@
public class TypeSwitchMethods {
+ // By design this is lock-free so the JVM may compute several times the same value.
public static boolean switchEnumEq(
Object value, Object[] cache, int index, String enumClass, String name) {
if (cache[index] == null) {
diff --git a/src/test/java/com/android/tools/r8/shaking/enums/IsEnumRemovalTest.java b/src/test/java/com/android/tools/r8/shaking/enums/IsEnumRemovalTest.java
index d0bab3a..669498a 100644
--- a/src/test/java/com/android/tools/r8/shaking/enums/IsEnumRemovalTest.java
+++ b/src/test/java/com/android/tools/r8/shaking/enums/IsEnumRemovalTest.java
@@ -14,7 +14,7 @@
import com.android.tools.r8.utils.codeinspector.ClassSubject;
import com.android.tools.r8.utils.codeinspector.CodeInspector;
import java.util.Set;
-import org.gradle.internal.impldep.org.testng.Assert;
+import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
diff --git a/src/test/java23/com/android/tools/r8/java23/switchpatternmatching/DexValueSwitchTest.java b/src/test/java23/com/android/tools/r8/java23/switchpatternmatching/DexValueSwitchTest.java
index 9f63637..78bb2ef 100644
--- a/src/test/java23/com/android/tools/r8/java23/switchpatternmatching/DexValueSwitchTest.java
+++ b/src/test/java23/com/android/tools/r8/java23/switchpatternmatching/DexValueSwitchTest.java
@@ -80,71 +80,6 @@
static class Main {
- // static void booleanSwitch(Boolean b) {
- // switch (b) {
- // case null -> {
- // System.out.println("null");
- // }
- // case true -> {
- // System.out.println("true");
- // }
- // default -> {
- // System.out.println("false");
- // }
- // }
- // }
- //
- // static void doubleSwitch(Double d) {
- // switch (d) {
- // case null -> {
- // System.out.println("null");
- // }
- // case 42.0 -> {
- // System.out.println("42");
- // }
- // case Double f2 when f2 > 0 -> {
- // System.out.println("positif");
- // }
- // default -> {
- // System.out.println("negatif");
- // }
- // }
- // }
- //
- // static void floatSwitch(Float f) {
- // switch (f) {
- // case null -> {
- // System.out.println("null");
- // }
- // case 42.0f -> {
- // System.out.println("42");
- // }
- // case Float f2 when f2 > 0 -> {
- // System.out.println("positif");
- // }
- // default -> {
- // System.out.println("negatif");
- // }
- // }
- // }
- //
- // static void longSwitch(Long l) {
- // switch (l) {
- // case null -> {
- // System.out.println("null");
- // }
- // case 42L -> {
- // System.out.println("42");
- // }
- // case Long i2 when i2 > 0 -> {
- // System.out.println("positif");
- // }
- // default -> {
- // System.out.println("negatif");
- // }
- // }
- // }
-
static void intSwitch(Integer i) {
switch (i) {
case null -> {