Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 199 for assertSame (0.17 sec)

  1. android/guava-tests/test/com/google/common/base/ThrowablesTest.java

        SomeCheckedException exception = new SomeCheckedException();
        assertSame(exception, Throwables.getRootCause(exception));
      }
    
      public void testGetRootCause_SingleWrapped() {
        SomeCheckedException cause = new SomeCheckedException();
        SomeChainingException exception = new SomeChainingException(cause);
        assertSame(cause, Throwables.getRootCause(exception));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/RunnablesTest.java

    /**
     * Unit tests for {@link Runnables}.
     *
     * @author Olivier Pernet
     */
    @GwtCompatible
    public class RunnablesTest extends TestCase {
      public void testDoNothingRunnableIsSingleton() {
        assertSame(Runnables.doNothing(), Runnables.doNothing());
      }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Sep 15 13:47:32 GMT 2016
    - 986 bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/base/PreconditionsTest.java

        }
      }
    
      private static final String NON_NULL_STRING = "foo";
    
      public void testCheckNotNull_simple_success() {
        String result = Preconditions.checkNotNull(NON_NULL_STRING);
        assertSame(NON_NULL_STRING, result);
      }
    
      public void testCheckNotNull_simple_failure() {
        try {
          Preconditions.checkNotNull(null);
          fail("no exception thrown");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java

        RegularImmutableMap<Integer, Integer> map =
            (RegularImmutableMap<Integer, Integer>) builder.buildOrThrow();
        Object[] mapInternalArray = map.alternatingKeysAndValues;
        assertSame(builderArray, builderArrayAfterPuts);
        assertSame(builderArray, mapInternalArray);
      }
    
      public void testBuilder_orderEntriesByValue() {
        ImmutableMap<String, Integer> map =
            new Builder<String, Integer>()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 14:39:16 GMT 2024
    - 37.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

          List<Entry<Object, Object>> warmed = warmUp(cache);
          for (int i = WARMUP_MIN; i < WARMUP_MAX; i++) {
            Entry<Object, Object> entry = warmed.get(i - WARMUP_MIN);
            Object newValue = new Object();
            assertSame(entry.getValue(), cache.asMap().put(entry.getKey(), newValue));
            // don't let the new entry get GCed
            warmed.add(entryOf(entry.getKey(), newValue));
            Object newKey = new Object();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 15K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/AsciiTest.java

      public void testToLowerCase() {
        assertEquals(LOWER, Ascii.toLowerCase(UPPER));
        assertSame(LOWER, Ascii.toLowerCase(LOWER));
        assertEquals(IGNORED, Ascii.toLowerCase(IGNORED));
        assertEquals("foobar", Ascii.toLowerCase("fOobaR"));
      }
    
      public void testToUpperCase() {
        assertEquals(UPPER, Ascii.toUpperCase(LOWER));
        assertSame(UPPER, Ascii.toUpperCase(UPPER));
        assertEquals(IGNORED, Ascii.toUpperCase(IGNORED));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java

      private static final String DATA1 = "data";
    
      public void testListenInPoolThreadReturnsSameFuture() throws Exception {
        ListenableFuture<String> listenableFuture = immediateFuture(DATA1);
        assertSame(listenableFuture, listenInPoolThread(listenableFuture));
      }
    
      private static class SingleCallListener implements Runnable {
    
        private boolean expectCall = false;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  8. 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();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 24.1K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

          threadUnexpectedException(t);
        }
      }
    
      /**
       * Just like assertSame(x, y), but additionally recording (using threadRecordFailure) any
       * AssertionFailedError thrown, so that the current testcase will fail.
       */
      public void threadAssertSame(Object x, Object y) {
        try {
          assertSame(x, y);
        } catch (AssertionFailedError t) {
          threadRecordFailure(t);
          throw t;
        }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

        BadFuture badInput = new BadFuture(Futures.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> {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
Back to top