Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for ex (0.18 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

        f.set("foo");
      }
    
      public void testExecutorSuccess() {
        CountingSameThreadExecutor ex = new CountingSameThreadExecutor();
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
        Futures.addCallback(f, callback, ex);
        f.set("foo");
        assertEquals(1, ex.runCount);
      }
    
      // Error cases
      public void testSameThreadExecutionException() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  2. android/guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java

        private final RuntimeException ex;
    
        private ThrowingIterator(RuntimeException ex) {
          this.ex = ex;
        }
    
        @Override
        public boolean hasNext() {
          // IteratorTester doesn't expect exceptions for hasNext().
          return true;
        }
    
        @Override
        public E next() {
          ex.fillInStackTrace();
          throw ex;
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 12:41:04 GMT 2023
    - 10.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

        try {
          UnsignedBytes.checkedCast(value);
          fail("Cast to byte should have failed: " + value);
        } catch (IllegalArgumentException ex) {
          assertWithMessage(value + " not found in exception text: " + ex.getMessage())
              .that(ex.getMessage().contains(String.valueOf(value)))
              .isTrue();
        }
      }
    
      public void testCompare() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

      }
    
      private static void assertCastFails(long value) {
        try {
          UnsignedInts.checkedCast(value);
          fail("Cast to int should have failed: " + value);
        } catch (IllegalArgumentException ex) {
          assertThat(ex).hasMessageThat().contains(String.valueOf(value));
        }
      }
    
      public void testSaturatedCast() {
        for (long value : UNSIGNED_INTS) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/primitives/SignedBytesTest.java

        try {
          SignedBytes.checkedCast(value);
          fail("Cast to byte should have failed: " + value);
        } catch (IllegalArgumentException ex) {
          assertWithMessage(value + " not found in exception text: " + ex.getMessage())
              .that(ex.getMessage().contains(String.valueOf(value)))
              .isTrue();
        }
      }
    
      public void testCompare() {
        for (byte x : VALUES) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 7K bytes
    - Viewed (0)
  6. android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java

        static {
          try {
            UNSAFE = getUnsafe();
            HEAD_OFFSET = UNSAFE.objectFieldOffset(ExecutionListCAS.class.getDeclaredField("head"));
          } catch (Exception ex) {
            throw new Error(ex);
          }
        }
    
        /** TODO(lukes): This was copied verbatim from Striped64.java... standardize this? */
        private static sun.misc.Unsafe getUnsafe() {
          try {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 15:19:38 GMT 2023
    - 20.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/primitives/ShortsTest.java

        try {
          Shorts.checkedCast(value);
          fail("Cast to short should have failed: " + value);
        } catch (IllegalArgumentException ex) {
          assertWithMessage(value + " not found in exception text: " + ex.getMessage())
              .that(ex.getMessage().contains(String.valueOf(value)))
              .isTrue();
        }
      }
    
      public void testCompare() {
        for (short x : VALUES) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/base/SuppliersTest.java

            .isEqualTo("Suppliers.memoize(<supplier that returned 10>)");
    
        // Should get an exception when we try to serialize.
        RuntimeException ex = assertThrows(RuntimeException.class, () -> reserialize(memoizedSupplier));
        assertThat(ex).hasCauseThat().isInstanceOf(java.io.NotSerializableException.class);
      }
    
      @J2ktIncompatible
      @GwtIncompatible // SerializableTester
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/base/SuppliersTest.java

            .isEqualTo("Suppliers.memoize(<supplier that returned 10>)");
    
        // Should get an exception when we try to serialize.
        RuntimeException ex = assertThrows(RuntimeException.class, () -> reserialize(memoizedSupplier));
        assertThat(ex).hasCauseThat().isInstanceOf(java.io.NotSerializableException.class);
      }
    
      @J2ktIncompatible
      @GwtIncompatible // SerializableTester
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  10. guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java

        private final RuntimeException ex;
    
        private ThrowingIterator(RuntimeException ex) {
          this.ex = ex;
        }
    
        @Override
        public boolean hasNext() {
          // IteratorTester doesn't expect exceptions for hasNext().
          return true;
        }
    
        @Override
        public E next() {
          ex.fillInStackTrace();
          throw ex;
        }
    
        @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 12:41:04 GMT 2023
    - 10.4K bytes
    - Viewed (0)
Back to top