From e3b435498a88f389c4aeafa711230465d2c76c17 Mon Sep 17 00:00:00 2001 From: Martin Kretzschmar Date: Thu, 29 Feb 2024 07:40:44 -0800 Subject: [PATCH] Enable a few more Guava Primitives tests for J2KT - some Base regex helpers have become available for J2KT since last iteration. Thanks cpovirk@ for pointing this out - there was a transpiler improvement: `GREATEST - (short) 1` is a compile time constant in Java and can be used to initialize a `short` because the compiler can verify that the value is small enough. The straight-forward translation `GREATEST - 1.toShort()` is not a compile time constant in Kotlin and cannot be used to initialize a `Short`. The transpiler handles this now RELNOTES=n/a PiperOrigin-RevId: 611467476 --- core/src/main/java/com/google/common/truth/StringSubject.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/src/main/java/com/google/common/truth/StringSubject.java b/core/src/main/java/com/google/common/truth/StringSubject.java index 3b675889d6..597bcd9bbd 100644 --- a/core/src/main/java/com/google/common/truth/StringSubject.java +++ b/core/src/main/java/com/google/common/truth/StringSubject.java @@ -165,7 +165,6 @@ public void doesNotMatch(@Nullable String regex) { /** Fails if the string matches the given regex. */ @GwtIncompatible("java.util.regex.Pattern") - @J2ktIncompatible public void doesNotMatch(@Nullable Pattern regex) { checkNotNull(regex); if (actual == null) { @@ -177,7 +176,6 @@ public void doesNotMatch(@Nullable Pattern regex) { /** Fails if the string does not contain a match on the given regex. */ @GwtIncompatible("java.util.regex.Pattern") - @J2ktIncompatible public void containsMatch(@Nullable Pattern regex) { checkNotNull(regex); if (actual == null) { @@ -199,7 +197,6 @@ public void containsMatch(@Nullable String regex) { /** Fails if the string contains a match on the given regex. */ @GwtIncompatible("java.util.regex.Pattern") - @J2ktIncompatible public void doesNotContainMatch(@Nullable Pattern regex) { checkNotNull(regex); if (actual == null) {