Skip to content

Commit

Permalink
Enable a few more Guava Primitives tests for J2KT
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
martinkretzschmar authored and Google Java Core Libraries committed Feb 29, 2024
1 parent ae78f4a commit e3b4354
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions core/src/main/java/com/google/common/truth/StringSubject.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit e3b4354

Please sign in to comment.