Fix time test expectations
Fix red bots
Change-Id: I5eb3a6123b170d68385fb57e55f3ef680bf01bf4
diff --git a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/jdktests/Jdk11TimeAbstractTests.java b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/jdktests/Jdk11TimeAbstractTests.java
index 67436c2..bc89176 100644
--- a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/jdktests/Jdk11TimeAbstractTests.java
+++ b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/jdktests/Jdk11TimeAbstractTests.java
@@ -169,12 +169,13 @@
"test.java.time.TestPeriod",
"test.java.time.TestClock_System",
"test.java.time.TestOffsetDateTime_instants",
- "tck.java.time.TestIsoChronology",
"test.java.time.temporal.TestDateTimeBuilderCombinations",
"test.java.time.temporal.TestJulianFields",
"test.java.time.temporal.TestChronoUnit",
"test.java.time.temporal.TestDateTimeValueRange"
};
+ static final String[] RAW_TEMPORAL_SUCCESSES_IF_BRIDGE =
+ new String[] {"tck.java.time.TestIsoChronology"};
static final String[] RAW_TEMPORAL_SUCCESSES_BUT_12 =
new String[] {"test.java.time.temporal.TestIsoWeekFields"};
static final String[] FORMAT_CHRONO_SUCCESSES =
@@ -192,8 +193,6 @@
"test.java.time.format.TestDateTimeParsing",
"test.java.time.format.TestSettingsParser",
"test.java.time.format.TestNumberParser",
- "test.java.time.format.TestTextParserWithLocale",
- "test.java.time.format.TestTextPrinterWithLocale",
"test.java.time.format.TestReducedPrinter",
"test.java.time.format.TestCharLiteralParser",
"test.java.time.chrono.TestChronologyPerf",
@@ -201,13 +200,14 @@
"test.java.time.chrono.TestJapaneseChronology",
"test.java.time.chrono.TestChronoLocalDate",
"test.java.time.chrono.TestIsoChronoImpl",
- "test.java.time.chrono.TestUmmAlQuraChronology",
};
static final String[] FORMAT_CHRONO_SUCCESSES_UP_TO_11 =
new String[] {
"test.java.time.format.TestDateTimeTextProviderWithLocale",
"test.java.time.format.TestUnicodeExtension",
"test.java.time.format.TestDateTimeFormatterBuilderWithLocale",
+ "test.java.time.format.TestTextParserWithLocale",
+ "test.java.time.format.TestTextPrinterWithLocale",
"test.java.time.chrono.TestUmmAlQuraChronology",
};
diff --git a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/jdktests/Jdk11TimeRawTemporalTests.java b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/jdktests/Jdk11TimeRawTemporalTests.java
index 3f29636..2b9b95c 100644
--- a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/jdktests/Jdk11TimeRawTemporalTests.java
+++ b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/jdktests/Jdk11TimeRawTemporalTests.java
@@ -4,10 +4,13 @@
package com.android.tools.r8.desugar.desugaredlibrary.jdktests;
+import static com.android.tools.r8.desugar.desugaredlibrary.test.LibraryDesugaringSpecification.JDK8;
+
import com.android.tools.r8.TestParameters;
import com.android.tools.r8.ToolHelper.DexVm.Version;
import com.android.tools.r8.desugar.desugaredlibrary.test.CompilationSpecification;
import com.android.tools.r8.desugar.desugaredlibrary.test.LibraryDesugaringSpecification;
+import com.android.tools.r8.utils.AndroidApiLevel;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -29,5 +32,11 @@
// In 12 some ISO is supported that other versions do not support.
testTime(RAW_TEMPORAL_SUCCESSES_BUT_12);
}
+ // The bridge is always present with JDK11 due to partial desugaring between 26 and 33.
+ // On JDK8 the bridge is absent in between 26 and 33.
+ if (libraryDesugaringSpecification != JDK8
+ || !parameters.getApiLevel().betweenBothIncluded(AndroidApiLevel.O, AndroidApiLevel.Sv2)) {
+ testTime(RAW_TEMPORAL_SUCCESSES_IF_BRIDGE);
+ }
}
}