Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testAccept (0.05 sec)

  1. guava-tests/test/com/google/common/io/PatternFilenameFilterTest.java

     */
    public class PatternFilenameFilterTest extends TestCase {
    
      public void testSyntaxException() {
        assertThrows(PatternSyntaxException.class, () -> new PatternFilenameFilter("("));
      }
    
      public void testAccept() {
        File dir = new File("foo");
        FilenameFilter filter = new PatternFilenameFilter("a+");
        assertTrue(filter.accept(dir, "a"));
        assertTrue(filter.accept(dir, "aaaa"));
        assertFalse(filter.accept(dir, "b"));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top