Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 134 for assertSame (0.05 sec)

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

        BadFuture badInput = new BadFuture(immediateFuture(20));
        ListenableFuture<String> chain = buildChainingFuture(badInput);
        ExecutionException e = assertThrows(ExecutionException.class, () -> chain.get());
        assertSame(RuntimeException.class, e.getCause().getClass());
      }
    
      /** Proxy to throw a {@link RuntimeException} out of the {@link #get()} method. */
      public static class BadFuture extends SimpleForwardingListenableFuture<Integer> {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

        assertThrows(TimeoutException.class, () -> future.get(0, MILLISECONDS));
        FooChild value = new FooChild();
        nested.set(value);
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
        assertSame(value, future.get());
      }
    
      public void testCancel_innerCancelsAsync() throws Exception {
        SettableFuture<Object> async = SettableFuture.create();
        SettableFuture<Object> inner = SettableFuture.create();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/base/EquivalenceTest.java

            .testEquals();
      }
    
      public void testWrap_get() {
        String test = "test";
        Wrapper<String> wrapper = LENGTH_EQUIVALENCE.wrap(test);
        assertSame(test, wrapper.get());
      }
    
      @J2ktIncompatible
      @GwtIncompatible // SerializableTester
      public void testSerialization() {
        SerializableTester.reserializeAndAssert(LENGTH_EQUIVALENCE.wrap("hello"));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java

                throw exception;
              }
            };
    
        // It should pass through untouched
        SomeUncheckedException e = assertThrows(SomeUncheckedException.class, iter::hasNext);
        assertSame(exception, e);
      }
    
      public void testExceptionAfterEndOfData() {
        Iterator<Integer> iter =
            new AbstractIterator<Integer>() {
              @Override
              public Integer computeNext() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/AbstractIteratorTest.java

                throw exception;
              }
            };
    
        // It should pass through untouched
        SomeUncheckedException e = assertThrows(SomeUncheckedException.class, iter::hasNext);
        assertSame(exception, e);
      }
    
      public void testExceptionAfterEndOfData() {
        Iterator<Integer> iter =
            new AbstractIterator<Integer>() {
              @Override
              public Integer computeNext() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/CaseFormatTest.java

     *
     * @author Mike Bostock
     */
    @GwtCompatible(emulated = true)
    public class CaseFormatTest extends TestCase {
    
      public void testIdentity() {
        for (CaseFormat from : CaseFormat.values()) {
          assertSame(from + " to " + from, "foo", from.to(from, "foo"));
          for (CaseFormat to : CaseFormat.values()) {
            assertEquals(from + " to " + to, "", from.to(to, ""));
            assertEquals(from + " to " + to, " ", from.to(to, " "));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu May 04 09:41:29 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java

        // this gets the stripes with #getAt(index)
        for (int i = 0; i < striped.size(); i++) {
          Object object = striped.getAt(i);
          assertNotNull(object);
          assertSame(object, striped.getAt(i)); // idempotent
          observed.add(object);
        }
        assertTrue("All stripes observed", observed.size() == striped.size());
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 26 12:58:35 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

        // this gets the stripes with #getAt(index)
        for (int i = 0; i < striped.size(); i++) {
          Object object = striped.getAt(i);
          assertNotNull(object);
          assertSame(object, striped.getAt(i)); // idempotent
          observed.add(object);
        }
        assertTrue("All stripes observed", observed.size() == striped.size());
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 26 12:58:35 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/RangeTest.java

        assertUnboundedBelow(range);
        assertUnboundedAbove(range);
        assertFalse(range.isEmpty());
        assertEquals("(-\u221e..+\u221e)", range.toString());
        assertSame(range, reserializeAndAssert(range));
        assertSame(range, Range.all());
      }
    
      private static void assertUnboundedBelow(Range<Integer> range) {
        assertFalse(range.hasLowerBound());
        try {
          range.lowerEndpoint();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        List<? extends Future<?>> unused = executor.invokeAll(tasks);
      }
    
      public void testListeningDecorator() throws Exception {
        ListeningExecutorService service = listeningDecorator(newDirectExecutorService());
        assertSame(service, listeningDecorator(service));
        List<Callable<String>> callables = ImmutableList.of(Callables.returning("x"));
        List<Future<String>> results;
    
        results = service.invokeAll(callables);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
Back to top