|
21 | 21 | import com.google.common.collect.Multimap;
|
22 | 22 | import com.google.common.collect.Multiset;
|
23 | 23 | import com.google.common.collect.Table;
|
| 24 | +import com.google.j2objc.annotations.J2ObjCIncompatible; |
24 | 25 | import java.math.BigDecimal;
|
| 26 | +import java.nio.file.Path; |
25 | 27 | import java.util.Map;
|
26 | 28 | import java.util.Optional;
|
27 | 29 | import java.util.OptionalDouble;
|
28 | 30 | import java.util.OptionalInt;
|
| 31 | +import java.util.OptionalLong; |
29 | 32 | import java.util.stream.IntStream;
|
30 | 33 | import java.util.stream.LongStream;
|
31 | 34 | import java.util.stream.Stream;
|
@@ -274,6 +277,14 @@ public static OptionalIntSubject assertThat(@Nullable OptionalInt actual) {
|
274 | 277 | return assert_().that(actual);
|
275 | 278 | }
|
276 | 279 |
|
| 280 | + /** |
| 281 | + * @since 1.4.0 (present in {@link Truth8} since before 1.0) |
| 282 | + */ |
| 283 | + @SuppressWarnings("Java7ApiChecker") // no more dangerous than wherever the user got the Stream |
| 284 | + public static OptionalLongSubject assertThat(@Nullable OptionalLong actual) { |
| 285 | + return assert_().that(actual); |
| 286 | + } |
| 287 | + |
277 | 288 | /**
|
278 | 289 | * @since 1.4.0 (present in {@link Truth8} since before 1.0)
|
279 | 290 | */
|
@@ -308,6 +319,16 @@ public static LongStreamSubject assertThat(@Nullable LongStream actual) {
|
308 | 319 |
|
309 | 320 | // TODO(b/64757353): Add support for DoubleStream?
|
310 | 321 |
|
| 322 | + /** |
| 323 | + * @since 1.4.0 (present in {@link Truth8} since before 1.0) |
| 324 | + */ |
| 325 | + @GwtIncompatible |
| 326 | + @J2ObjCIncompatible |
| 327 | + @J2ktIncompatible |
| 328 | + public static PathSubject assertThat(@Nullable Path actual) { |
| 329 | + return assert_().that(actual); |
| 330 | + } |
| 331 | + |
311 | 332 | /**
|
312 | 333 | * An {@code AssertionError} that (a) always supports a cause, even under old versions of Android
|
313 | 334 | * and (b) omits "java.lang.AssertionError:" from the beginning of its toString() representation.
|
|
0 commit comments