From 09993692eae0f278eea6fa123b1a5e4ecdd00720 Mon Sep 17 00:00:00 2001 From: cpovirk Date: Wed, 31 Jan 2024 09:56:34 -0800 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 603080567 --- .../google/common/truth/OptionalDoubleSubjectTest.java | 7 +++---- .../com/google/common/truth/OptionalIntSubjectTest.java | 7 +++---- .../com/google/common/truth/OptionalLongSubjectTest.java | 7 +++---- .../com/google/common/truth/OptionalSubjectTest.java | 9 ++++----- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/extensions/java8/src/test/java/com/google/common/truth/OptionalDoubleSubjectTest.java b/extensions/java8/src/test/java/com/google/common/truth/OptionalDoubleSubjectTest.java index 94490fa02..1b9cfefde 100644 --- a/extensions/java8/src/test/java/com/google/common/truth/OptionalDoubleSubjectTest.java +++ b/extensions/java8/src/test/java/com/google/common/truth/OptionalDoubleSubjectTest.java @@ -18,7 +18,6 @@ import static com.google.common.truth.ExpectFailure.assertThat; import static com.google.common.truth.OptionalDoubleSubject.optionalDoubles; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import java.util.OptionalDouble; import org.junit.Test; @@ -41,7 +40,7 @@ public void failOnNullSubject() { @Test public void isPresent() { - assertThat(OptionalDouble.of(1337.0)).isPresent(); + Truth8.assertThat(OptionalDouble.of(1337.0)).isPresent(); } @Test @@ -53,7 +52,7 @@ public void isPresentFailing() { @Test public void isEmpty() { - assertThat(OptionalDouble.empty()).isEmpty(); + Truth8.assertThat(OptionalDouble.empty()).isEmpty(); } @Test @@ -72,7 +71,7 @@ public void isEmptyFailingNull() { @Test public void hasValue() { - assertThat(OptionalDouble.of(1337.0)).hasValue(1337.0); + Truth8.assertThat(OptionalDouble.of(1337.0)).hasValue(1337.0); } @Test diff --git a/extensions/java8/src/test/java/com/google/common/truth/OptionalIntSubjectTest.java b/extensions/java8/src/test/java/com/google/common/truth/OptionalIntSubjectTest.java index 9c68a875f..c7f2d3561 100644 --- a/extensions/java8/src/test/java/com/google/common/truth/OptionalIntSubjectTest.java +++ b/extensions/java8/src/test/java/com/google/common/truth/OptionalIntSubjectTest.java @@ -18,7 +18,6 @@ import static com.google.common.truth.ExpectFailure.assertThat; import static com.google.common.truth.OptionalIntSubject.optionalInts; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import java.util.OptionalInt; import org.junit.Test; @@ -41,7 +40,7 @@ public void failOnNullSubject() { @Test public void isPresent() { - assertThat(OptionalInt.of(1337)).isPresent(); + Truth8.assertThat(OptionalInt.of(1337)).isPresent(); } @Test @@ -53,7 +52,7 @@ public void isPresentFailing() { @Test public void isEmpty() { - assertThat(OptionalInt.empty()).isEmpty(); + Truth8.assertThat(OptionalInt.empty()).isEmpty(); } @Test @@ -72,7 +71,7 @@ public void isEmptyFailingNull() { @Test public void hasValue() { - assertThat(OptionalInt.of(1337)).hasValue(1337); + Truth8.assertThat(OptionalInt.of(1337)).hasValue(1337); } @Test diff --git a/extensions/java8/src/test/java/com/google/common/truth/OptionalLongSubjectTest.java b/extensions/java8/src/test/java/com/google/common/truth/OptionalLongSubjectTest.java index 211ed504d..6b4202f9c 100644 --- a/extensions/java8/src/test/java/com/google/common/truth/OptionalLongSubjectTest.java +++ b/extensions/java8/src/test/java/com/google/common/truth/OptionalLongSubjectTest.java @@ -18,7 +18,6 @@ import static com.google.common.truth.ExpectFailure.assertThat; import static com.google.common.truth.OptionalLongSubject.optionalLongs; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import java.util.OptionalLong; import org.junit.Test; @@ -41,7 +40,7 @@ public void failOnNullSubject() { @Test public void isPresent() { - assertThat(OptionalLong.of(1337L)).isPresent(); + Truth8.assertThat(OptionalLong.of(1337L)).isPresent(); } @Test @@ -53,7 +52,7 @@ public void isPresentFailing() { @Test public void isEmpty() { - assertThat(OptionalLong.empty()).isEmpty(); + Truth8.assertThat(OptionalLong.empty()).isEmpty(); } @Test @@ -72,7 +71,7 @@ public void isEmptyFailingNull() { @Test public void hasValue() { - assertThat(OptionalLong.of(1337L)).hasValue(1337L); + Truth8.assertThat(OptionalLong.of(1337L)).hasValue(1337L); } @Test diff --git a/extensions/java8/src/test/java/com/google/common/truth/OptionalSubjectTest.java b/extensions/java8/src/test/java/com/google/common/truth/OptionalSubjectTest.java index e1cdc5662..9a05d8b00 100644 --- a/extensions/java8/src/test/java/com/google/common/truth/OptionalSubjectTest.java +++ b/extensions/java8/src/test/java/com/google/common/truth/OptionalSubjectTest.java @@ -18,7 +18,6 @@ import static com.google.common.truth.ExpectFailure.assertThat; import static com.google.common.truth.OptionalSubject.optionals; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import static org.junit.Assert.fail; import java.util.Optional; @@ -36,7 +35,7 @@ public class OptionalSubjectTest { @Test public void isPresent() { - assertThat(Optional.of("foo")).isPresent(); + Truth8.assertThat(Optional.of("foo")).isPresent(); } @Test @@ -57,7 +56,7 @@ public void isPresentFailingNull() { @Test public void isEmpty() { - assertThat(Optional.empty()).isEmpty(); + Truth8.assertThat(Optional.empty()).isEmpty(); } @Test @@ -76,7 +75,7 @@ public void isEmptyFailingNull() { @Test public void hasValue() { - assertThat(Optional.of("foo")).hasValue("foo"); + Truth8.assertThat(Optional.of("foo")).hasValue("foo"); } @Test @@ -93,7 +92,7 @@ public void hasValue_failingWithEmpty() { @Test public void hasValue_npeWithNullParameter() { try { - assertThat(Optional.of("foo")).hasValue(null); + Truth8.assertThat(Optional.of("foo")).hasValue(null); fail("Expected NPE"); } catch (NullPointerException expected) { assertThat(expected).hasMessageThat().isEqualTo("Optional cannot have a null value.");