Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 831 for Try (0.16 sec)

  1. guava-tests/test/com/google/common/math/MathPreconditionsTest.java

      public void testCheckPositive_zeroInt() {
        try {
          MathPreconditions.checkPositive("int", 0);
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testCheckPositive_maxInt() {
        MathPreconditions.checkPositive("int", Integer.MAX_VALUE);
      }
    
      public void testCheckPositive_minInt() {
        try {
          MathPreconditions.checkPositive("int", Integer.MIN_VALUE);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  2. guava-testlib/test/com/google/common/collect/testing/HelpersTest.java

        }
    
        try {
          Helpers.assertContentsInOrder(list, "a", "b", "c", "d");
          throw new Error();
        } catch (AssertionFailedError expected) {
        }
    
        try {
          Helpers.assertContentsInOrder(list, "a", "c", "b");
          throw new Error();
        } catch (AssertionFailedError expected) {
        }
    
        try {
          Helpers.assertContentsInOrder(list, "a", "B", "c");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/net/MediaTypeTest.java

        }
        try {
          MediaType.parse("text/");
          fail();
        } catch (IllegalArgumentException expected) {
        }
        try {
          MediaType.parse("te<t/plain");
          fail();
        } catch (IllegalArgumentException expected) {
        }
        try {
          MediaType.parse("text/pl@in");
          fail();
        } catch (IllegalArgumentException expected) {
        }
        try {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Mar 05 13:16:00 GMT 2024
    - 21.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/net/MediaTypeTest.java

        }
        try {
          MediaType.parse("text/");
          fail();
        } catch (IllegalArgumentException expected) {
        }
        try {
          MediaType.parse("te<t/plain");
          fail();
        } catch (IllegalArgumentException expected) {
        }
        try {
          MediaType.parse("text/pl@in");
          fail();
        } catch (IllegalArgumentException expected) {
        }
        try {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Mar 05 13:16:00 GMT 2024
    - 21.4K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/collect/testing/MinimalIterableTest.java

        assertTrue(iterator.hasNext());
        assertEquals("a", iterator.next());
        try {
          iterator.remove();
          fail();
        } catch (UnsupportedOperationException expected) {
        }
        assertFalse(iterator.hasNext());
        try {
          iterator.next();
          fail();
        } catch (NoSuchElementException expected) {
        }
        try {
          iterable.iterator();
          fail();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/CloserTest.java

        TestCloseable c1 = closer.register(TestCloseable.normal());
        TestCloseable c2 = closer.register(TestCloseable.normal());
    
        IOException exception = new IOException();
    
        try {
          try {
            throw exception;
          } catch (Throwable e) {
            throw closer.rethrow(e);
          } finally {
            closer.close();
          }
        } catch (Throwable expected) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/math/LongMathTest.java

        for (long x : NEGATIVE_LONG_CANDIDATES) {
          try {
            LongMath.ceilingPowerOfTwo(x);
            fail("Expected IllegalArgumentException");
          } catch (IllegalArgumentException expected) {
          }
        }
      }
    
      public void testFloorPowerOfTwoNegative() {
        for (long x : NEGATIVE_LONG_CANDIDATES) {
          try {
            LongMath.floorPowerOfTwo(x);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

        Thread.currentThread().interrupt();
        try {
          assertEquals("foo", getUnchecked(immediateFuture("foo")));
          assertTrue(Thread.currentThread().isInterrupted());
        } finally {
          Thread.interrupted();
        }
      }
    
      public void testGetUnchecked_cancelled() {
        SettableFuture<String> future = SettableFuture.create();
        future.cancel(true);
        try {
          getUnchecked(future);
          fail();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ArrayTableTest.java

        assertNull(table.at(1, 2));
        try {
          table.at(1, 3);
          fail();
        } catch (IndexOutOfBoundsException expected) {
        }
        try {
          table.at(1, -1);
          fail();
        } catch (IndexOutOfBoundsException expected) {
        }
        try {
          table.at(3, 2);
          fail();
        } catch (IndexOutOfBoundsException expected) {
        }
        try {
          table.at(-1, 2);
          fail();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 16:54:11 GMT 2024
    - 17.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/ArrayTableTest.java

        assertNull(table.at(1, 2));
        try {
          table.at(1, 3);
          fail();
        } catch (IndexOutOfBoundsException expected) {
        }
        try {
          table.at(1, -1);
          fail();
        } catch (IndexOutOfBoundsException expected) {
        }
        try {
          table.at(3, 2);
          fail();
        } catch (IndexOutOfBoundsException expected) {
        }
        try {
          table.at(-1, 2);
          fail();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 16:54:11 GMT 2024
    - 17.5K bytes
    - Viewed (0)
Back to top