aboutsummaryrefslogtreecommitdiff
path: root/android/guava-tests/test/com/google/common/io/PatternFilenameFilterTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/guava-tests/test/com/google/common/io/PatternFilenameFilterTest.java')
-rw-r--r--android/guava-tests/test/com/google/common/io/PatternFilenameFilterTest.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/android/guava-tests/test/com/google/common/io/PatternFilenameFilterTest.java b/android/guava-tests/test/com/google/common/io/PatternFilenameFilterTest.java
index 94ab1f016..699b2a458 100644
--- a/android/guava-tests/test/com/google/common/io/PatternFilenameFilterTest.java
+++ b/android/guava-tests/test/com/google/common/io/PatternFilenameFilterTest.java
@@ -16,6 +16,8 @@
package com.google.common.io;
+import static org.junit.Assert.assertThrows;
+
import com.google.common.testing.NullPointerTester;
import com.google.common.testing.NullPointerTester.Visibility;
import java.io.File;
@@ -31,11 +33,7 @@ import junit.framework.TestCase;
public class PatternFilenameFilterTest extends TestCase {
public void testSyntaxException() {
- try {
- new PatternFilenameFilter("(");
- fail("expected exception");
- } catch (PatternSyntaxException expected) {
- }
+ assertThrows(PatternSyntaxException.class, () -> new PatternFilenameFilter("("));
}
public void testAccept() {