Update Kotlin 1.3.72 tests
Change-Id: Ia11caf4e44f61588d4dd7e9739ec780b2c60e4a6
diff --git a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/kotlin/KotlinBlogTest.java b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/kotlin/KotlinBlogTest.java
index 95700a0..35de5d0 100644
--- a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/kotlin/KotlinBlogTest.java
+++ b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/kotlin/KotlinBlogTest.java
@@ -98,10 +98,9 @@
.applyIf(
kotlinParameters.getCompiler().isNot(KOTLINC_1_3_72),
DesugaredLibraryTestBuilder::allowUnusedDontWarnPatterns)
- // TODO(b/391572031): Why is this needed? Don't we drop all keep rules with the
- // PARTIAL_EXCLUDE config?
.applyIf(
- compilationSpecification == CompilationSpecification.R8_PARTIAL_EXCLUDE_L8SHRINK,
+ kotlinParameters.getCompiler().isNot(KOTLINC_1_3_72)
+ && compilationSpecification == CompilationSpecification.R8_PARTIAL_EXCLUDE_L8SHRINK,
DesugaredLibraryTestBuilder::allowUnusedProguardConfigurationRules)
.compile()
.withArt6Plus64BitsLib()
diff --git a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/kotlin/KotlinMetadataTest.java b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/kotlin/KotlinMetadataTest.java
index a901047..f993e24 100644
--- a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/kotlin/KotlinMetadataTest.java
+++ b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/kotlin/KotlinMetadataTest.java
@@ -119,14 +119,15 @@
"-keepclassmembers class " + PKG + ".Skynet { * specialDay; }")
.addKeepAttributes(ProguardKeepAttributes.RUNTIME_VISIBLE_ANNOTATIONS)
.allowDiagnosticMessages()
- // TODO(b/391572031): Why is this needed? Don't we drop all keep rules with the
- // PARTIAL_EXCLUDE config?
+ // The Kotlin 1.3.72 reflect jar does not embed a keep rule for kotlin.Metadata.
.applyIf(
- compilationSpecification.isNotProgramShrinkWithPartial(),
- DesugaredLibraryTestBuilder::allowUnusedProguardConfigurationRules)
- .applyIf(
- kotlinParameters.getCompiler().isNot(KOTLINC_1_3_72),
+ kotlinParameters.getCompiler().is(KOTLINC_1_3_72),
+ b -> b.addKeepRules("-keep class kotlin.Metadata { *; }"),
DesugaredLibraryTestBuilder::allowUnusedDontWarnPatterns)
+ .applyIf(
+ kotlinParameters.getCompiler().isNot(KOTLINC_1_3_72)
+ && compilationSpecification.isNotProgramShrinkWithPartial(),
+ DesugaredLibraryTestBuilder::allowUnusedProguardConfigurationRules)
.apply(configuration)
.compile()
.inspect(