Skip to content

Commit 0999369

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Automated Code Change
PiperOrigin-RevId: 603080567
1 parent 7c65fc6 commit 0999369

4 files changed

Lines changed: 13 additions & 17 deletions

File tree

extensions/java8/src/test/java/com/google/common/truth/OptionalDoubleSubjectTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import static com.google.common.truth.ExpectFailure.assertThat;
1919
import static com.google.common.truth.OptionalDoubleSubject.optionalDoubles;
2020
import static com.google.common.truth.Truth.assertThat;
21-
import static com.google.common.truth.Truth8.assertThat;
2221

2322
import java.util.OptionalDouble;
2423
import org.junit.Test;
@@ -41,7 +40,7 @@ public void failOnNullSubject() {
4140

4241
@Test
4342
public void isPresent() {
44-
assertThat(OptionalDouble.of(1337.0)).isPresent();
43+
Truth8.assertThat(OptionalDouble.of(1337.0)).isPresent();
4544
}
4645

4746
@Test
@@ -53,7 +52,7 @@ public void isPresentFailing() {
5352

5453
@Test
5554
public void isEmpty() {
56-
assertThat(OptionalDouble.empty()).isEmpty();
55+
Truth8.assertThat(OptionalDouble.empty()).isEmpty();
5756
}
5857

5958
@Test
@@ -72,7 +71,7 @@ public void isEmptyFailingNull() {
7271

7372
@Test
7473
public void hasValue() {
75-
assertThat(OptionalDouble.of(1337.0)).hasValue(1337.0);
74+
Truth8.assertThat(OptionalDouble.of(1337.0)).hasValue(1337.0);
7675
}
7776

7877
@Test

extensions/java8/src/test/java/com/google/common/truth/OptionalIntSubjectTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import static com.google.common.truth.ExpectFailure.assertThat;
1919
import static com.google.common.truth.OptionalIntSubject.optionalInts;
2020
import static com.google.common.truth.Truth.assertThat;
21-
import static com.google.common.truth.Truth8.assertThat;
2221

2322
import java.util.OptionalInt;
2423
import org.junit.Test;
@@ -41,7 +40,7 @@ public void failOnNullSubject() {
4140

4241
@Test
4342
public void isPresent() {
44-
assertThat(OptionalInt.of(1337)).isPresent();
43+
Truth8.assertThat(OptionalInt.of(1337)).isPresent();
4544
}
4645

4746
@Test
@@ -53,7 +52,7 @@ public void isPresentFailing() {
5352

5453
@Test
5554
public void isEmpty() {
56-
assertThat(OptionalInt.empty()).isEmpty();
55+
Truth8.assertThat(OptionalInt.empty()).isEmpty();
5756
}
5857

5958
@Test
@@ -72,7 +71,7 @@ public void isEmptyFailingNull() {
7271

7372
@Test
7473
public void hasValue() {
75-
assertThat(OptionalInt.of(1337)).hasValue(1337);
74+
Truth8.assertThat(OptionalInt.of(1337)).hasValue(1337);
7675
}
7776

7877
@Test

extensions/java8/src/test/java/com/google/common/truth/OptionalLongSubjectTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import static com.google.common.truth.ExpectFailure.assertThat;
1919
import static com.google.common.truth.OptionalLongSubject.optionalLongs;
2020
import static com.google.common.truth.Truth.assertThat;
21-
import static com.google.common.truth.Truth8.assertThat;
2221

2322
import java.util.OptionalLong;
2423
import org.junit.Test;
@@ -41,7 +40,7 @@ public void failOnNullSubject() {
4140

4241
@Test
4342
public void isPresent() {
44-
assertThat(OptionalLong.of(1337L)).isPresent();
43+
Truth8.assertThat(OptionalLong.of(1337L)).isPresent();
4544
}
4645

4746
@Test
@@ -53,7 +52,7 @@ public void isPresentFailing() {
5352

5453
@Test
5554
public void isEmpty() {
56-
assertThat(OptionalLong.empty()).isEmpty();
55+
Truth8.assertThat(OptionalLong.empty()).isEmpty();
5756
}
5857

5958
@Test
@@ -72,7 +71,7 @@ public void isEmptyFailingNull() {
7271

7372
@Test
7473
public void hasValue() {
75-
assertThat(OptionalLong.of(1337L)).hasValue(1337L);
74+
Truth8.assertThat(OptionalLong.of(1337L)).hasValue(1337L);
7675
}
7776

7877
@Test

extensions/java8/src/test/java/com/google/common/truth/OptionalSubjectTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import static com.google.common.truth.ExpectFailure.assertThat;
1919
import static com.google.common.truth.OptionalSubject.optionals;
2020
import static com.google.common.truth.Truth.assertThat;
21-
import static com.google.common.truth.Truth8.assertThat;
2221
import static org.junit.Assert.fail;
2322

2423
import java.util.Optional;
@@ -36,7 +35,7 @@ public class OptionalSubjectTest {
3635

3736
@Test
3837
public void isPresent() {
39-
assertThat(Optional.of("foo")).isPresent();
38+
Truth8.assertThat(Optional.of("foo")).isPresent();
4039
}
4140

4241
@Test
@@ -57,7 +56,7 @@ public void isPresentFailingNull() {
5756

5857
@Test
5958
public void isEmpty() {
60-
assertThat(Optional.empty()).isEmpty();
59+
Truth8.assertThat(Optional.empty()).isEmpty();
6160
}
6261

6362
@Test
@@ -76,7 +75,7 @@ public void isEmptyFailingNull() {
7675

7776
@Test
7877
public void hasValue() {
79-
assertThat(Optional.of("foo")).hasValue("foo");
78+
Truth8.assertThat(Optional.of("foo")).hasValue("foo");
8079
}
8180

8281
@Test
@@ -93,7 +92,7 @@ public void hasValue_failingWithEmpty() {
9392
@Test
9493
public void hasValue_npeWithNullParameter() {
9594
try {
96-
assertThat(Optional.of("foo")).hasValue(null);
95+
Truth8.assertThat(Optional.of("foo")).hasValue(null);
9796
fail("Expected NPE");
9897
} catch (NullPointerException expected) {
9998
assertThat(expected).hasMessageThat().isEqualTo("Optional cannot have a null value.");

0 commit comments

Comments
 (0)