Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 456 for assertThrows (0.12 sec)

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

        SettableFuture<String> future = SettableFuture.create();
        future.cancel(true);
        assertThrows(CancellationException.class, () -> getUnchecked(future));
      }
    
      public void testGetUnchecked_executionExceptionChecked() {
        UncheckedExecutionException expected =
            assertThrows(
                UncheckedExecutionException.class, () -> getUnchecked(FAILED_FUTURE_CHECKED_EXCEPTION));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

        SettableFuture<String> future = SettableFuture.create();
        future.cancel(true);
        assertThrows(CancellationException.class, () -> getUnchecked(future));
      }
    
      public void testGetUnchecked_executionExceptionChecked() {
        UncheckedExecutionException expected =
            assertThrows(
                UncheckedExecutionException.class, () -> getUnchecked(FAILED_FUTURE_CHECKED_EXCEPTION));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/DoubleMathTest.java

            .of(-1.375);
        assertThat(DoubleMath.mean(ImmutableList.of(1.1))).isWithin(1.0e-10).of(1.1);
        assertThrows(IllegalArgumentException.class, () -> DoubleMath.mean(ImmutableList.<Double>of()));
        assertThrows(
            IllegalArgumentException.class, () -> DoubleMath.mean(ImmutableList.of(Double.NaN)));
        assertThrows(
            IllegalArgumentException.class,
            () -> DoubleMath.mean(ImmutableList.of(Double.POSITIVE_INFINITY)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/testers/ListAddAtIndexTester.java

        assertThrows(
            ConcurrentModificationException.class,
            () -> {
              Iterator<E> iterator = collection.iterator();
              getList().add(0, e3());
              iterator.next();
            });
      }
    
      @ListFeature.Require(absent = SUPPORTS_ADD_WITH_INDEX)
      public void testAddAtIndex_unsupportedNotPresent() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AtomicsTest.java

        for (int i = 0; i < length; ++i) {
          assertEquals(null, refArray.get(i));
        }
        assertThrows(IndexOutOfBoundsException.class, () -> refArray.get(length));
      }
    
      public void testNewReferenceArray_withNegativeLength() throws Exception {
        assertThrows(NegativeArraySizeException.class, () -> Atomics.newReferenceArray(-1));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/graph/AbstractStandardUndirectedNetworkTest.java

        Set<Integer> nodes = network.nodes();
        assertThrows(UnsupportedOperationException.class, () -> nodes.add(N2));
        addNode(N1);
        assertThat(network.nodes()).containsExactlyElementsIn(nodes);
      }
    
      @Override
      @Test
      public void edges_checkReturnedSetMutability() {
        Set<String> edges = network.edges();
        assertThrows(UnsupportedOperationException.class, () -> edges.add(E12));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static org.junit.Assert.assertThrows;
    
    import java.util.concurrent.CancellationException;
    import java.util.concurrent.ExecutionException;
    import java.util.concurrent.TimeoutException;
    import junit.framework.TestCase;
    
    /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/math/QuantilesTest.java

      public void testScale_zero() {
        assertThrows(IllegalArgumentException.class, () -> Quantiles.scale(0));
      }
    
      public void testScale_negative() {
        assertThrows(IllegalArgumentException.class, () -> Quantiles.scale(-4));
      }
    
      public void testScale_index_negative() {
        Quantiles.Scale intermediate = Quantiles.scale(10);
        assertThrows(IllegalArgumentException.class, () -> intermediate.index(-1));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 29.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/base/JoinerTest.java

        checkResult(J, ITERABLE_12, "1-2");
        checkResult(J, ITERABLE_123, "1-2-3");
    
        assertThrows(NullPointerException.class, () -> J.join(ITERABLE_NULL));
        assertThrows(NullPointerException.class, () -> J.join(ITERABLE_1_NULL_2));
    
        assertThrows(NullPointerException.class, () -> J.join(ITERABLE_NULL.iterator()));
        assertThrows(NullPointerException.class, () -> J.join(ITERABLE_1_NULL_2.iterator()));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/math/StatsAccumulatorTest.java

      }
    
      public void testSampleVariance() {
        assertThrows(IllegalStateException.class, () -> emptyAccumulator.sampleVariance());
        assertThrows(
            IllegalStateException.class, () -> emptyAccumulatorByAddAllEmptyIterable.sampleVariance());
        assertThrows(
            IllegalStateException.class, () -> emptyAccumulatorByAddAllEmptyStats.sampleVariance());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 23 16:45:30 UTC 2024
    - 36.8K bytes
    - Viewed (0)
Back to top