Skip to content

Commit e3b4354

Browse files
martinkretzschmarGoogle Java Core Libraries
authored andcommitted
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
1 parent ae78f4a commit e3b4354

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

core/src/main/java/com/google/common/truth/StringSubject.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ public void doesNotMatch(@Nullable String regex) {
165165

166166
/** Fails if the string matches the given regex. */
167167
@GwtIncompatible("java.util.regex.Pattern")
168-
@J2ktIncompatible
169168
public void doesNotMatch(@Nullable Pattern regex) {
170169
checkNotNull(regex);
171170
if (actual == null) {
@@ -177,7 +176,6 @@ public void doesNotMatch(@Nullable Pattern regex) {
177176

178177
/** Fails if the string does not contain a match on the given regex. */
179178
@GwtIncompatible("java.util.regex.Pattern")
180-
@J2ktIncompatible
181179
public void containsMatch(@Nullable Pattern regex) {
182180
checkNotNull(regex);
183181
if (actual == null) {
@@ -199,7 +197,6 @@ public void containsMatch(@Nullable String regex) {
199197

200198
/** Fails if the string contains a match on the given regex. */
201199
@GwtIncompatible("java.util.regex.Pattern")
202-
@J2ktIncompatible
203200
public void doesNotContainMatch(@Nullable Pattern regex) {
204201
checkNotNull(regex);
205202
if (actual == null) {

0 commit comments

Comments
 (0)