diff --git a/android/guava-tests/test/com/google/common/primitives/LongsTest.java b/android/guava-tests/test/com/google/common/primitives/LongsTest.java index a86f8aca965e..9f4bfd562e56 100644 --- a/android/guava-tests/test/com/google/common/primitives/LongsTest.java +++ b/android/guava-tests/test/com/google/common/primitives/LongsTest.java @@ -648,6 +648,9 @@ public void testTryParse() { assertThat(Longs.tryParse("-")).isNull(); assertThat(Longs.tryParse("+1")).isNull(); assertThat(Longs.tryParse("999999999999999999999999")).isNull(); + assertThat(Longs.tryParse(" ")).isNull(); + assertThat(Longs.tryParse("1 ")).isNull(); + assertThat(Longs.tryParse(" 1")).isNull(); assertWithMessage("Max long + 1") .that(Longs.tryParse(BigInteger.valueOf(MAX_VALUE).add(BigInteger.ONE).toString())) .isNull(); diff --git a/guava-tests/test/com/google/common/primitives/LongsTest.java b/guava-tests/test/com/google/common/primitives/LongsTest.java index a86f8aca965e..9f4bfd562e56 100644 --- a/guava-tests/test/com/google/common/primitives/LongsTest.java +++ b/guava-tests/test/com/google/common/primitives/LongsTest.java @@ -648,6 +648,9 @@ public void testTryParse() { assertThat(Longs.tryParse("-")).isNull(); assertThat(Longs.tryParse("+1")).isNull(); assertThat(Longs.tryParse("999999999999999999999999")).isNull(); + assertThat(Longs.tryParse(" ")).isNull(); + assertThat(Longs.tryParse("1 ")).isNull(); + assertThat(Longs.tryParse(" 1")).isNull(); assertWithMessage("Max long + 1") .that(Longs.tryParse(BigInteger.valueOf(MAX_VALUE).add(BigInteger.ONE).toString())) .isNull();