diff options
author | Sadaf Ebrahimi <sadafebrahimi@google.com> | 2024-01-02 18:15:48 +0000 |
---|---|---|
committer | Sadaf Ebrahimi <sadafebrahimi@google.com> | 2024-01-02 18:23:02 +0000 |
commit | 1b60467f3624ad6bae92bb65652a10c49639023e (patch) | |
tree | cbc7e4894708533a0ddc4e61da1d74e64393e0e1 /guava-testlib/src/com/google/common/collect/testing/testers/NavigableSetNavigationTester.java | |
parent | eec82bd5ace8fd2c4ba647f153c4c03e1bb41268 (diff) | |
parent | d258d3ed3336934354f340518065b04528fb1f2b (diff) | |
download | guava-1b60467f3624ad6bae92bb65652a10c49639023e.tar.gz |
Upgrade guava to v33.0.0
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update guava
For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md
Test: TreeHugger
Change-Id: I9a54a36317484a947b630a037e23c9919c2951cd
Diffstat (limited to 'guava-testlib/src/com/google/common/collect/testing/testers/NavigableSetNavigationTester.java')
-rw-r--r-- | guava-testlib/src/com/google/common/collect/testing/testers/NavigableSetNavigationTester.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/guava-testlib/src/com/google/common/collect/testing/testers/NavigableSetNavigationTester.java b/guava-testlib/src/com/google/common/collect/testing/testers/NavigableSetNavigationTester.java index 8b056b4cb..354dd608d 100644 --- a/guava-testlib/src/com/google/common/collect/testing/testers/NavigableSetNavigationTester.java +++ b/guava-testlib/src/com/google/common/collect/testing/testers/NavigableSetNavigationTester.java @@ -20,6 +20,7 @@ import static com.google.common.collect.testing.features.CollectionFeature.SUPPO import static com.google.common.collect.testing.features.CollectionSize.ONE; import static com.google.common.collect.testing.features.CollectionSize.SEVERAL; import static com.google.common.collect.testing.features.CollectionSize.ZERO; +import static org.junit.Assert.assertThrows; import com.google.common.annotations.GwtIncompatible; import com.google.common.collect.testing.Helpers; @@ -128,11 +129,7 @@ public class NavigableSetNavigationTester<E> extends AbstractSetTester<E> { @CollectionFeature.Require(absent = SUPPORTS_REMOVE) public void testPollFirstUnsupported() { - try { - navigableSet.pollFirst(); - fail(); - } catch (UnsupportedOperationException e) { - } + assertThrows(UnsupportedOperationException.class, () -> navigableSet.pollFirst()); } @CollectionSize.Require(SEVERAL) @@ -209,11 +206,7 @@ public class NavigableSetNavigationTester<E> extends AbstractSetTester<E> { @CollectionFeature.Require(absent = SUPPORTS_REMOVE) public void testPollLastUnsupported() { - try { - navigableSet.pollLast(); - fail(); - } catch (UnsupportedOperationException e) { - } + assertThrows(UnsupportedOperationException.class, () -> navigableSet.pollLast()); } @CollectionSize.Require(SEVERAL) |