Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 51 for ok (0.49 sec)

  1. guava-tests/test/com/google/common/collect/PeekingIteratorTest.java

        } catch (IllegalStateException e) {
          /* expected */
        }
    
        assertEquals(
            "After remove() throws exception, peek should still be ok", "B", peekingIterator.peek());
    
        /* Should recover to be able to remove() after next(). */
        assertEquals("B", peekingIterator.next());
        peekingIterator.remove();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 9K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/net/InetAddressesTest.java

        // Shouldn't hit DNS, because it's an IP string literal.
        InetAddress ipv4Addr;
        try {
          ipv4Addr = InetAddress.getByName(ipStr);
        } catch (UnknownHostException e) {
          // OK: this is probably Android, which is stricter.
          return;
        }
        assertEquals(ipv4Addr, InetAddresses.forString(ipStr));
        assertTrue(InetAddresses.isInetAddress(ipStr));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 31.9K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

       */
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public boolean offer(E e) {
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          boolean ok = q.offer(e);
          if (!ok) {
            throw new AssertionError();
          }
          return true;
        } finally {
          monitor.leave();
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 19.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/base/FunctionsTest.java

          Y expected = null;
          try {
            expected = f.apply(i);
          } catch (IllegalArgumentException e) {
            try {
              g.apply(i);
              fail();
            } catch (IllegalArgumentException ok) {
              continue;
            }
          }
          assertEquals(expected, g.apply(i));
        }
      }
    
      @J2ktIncompatible
      @GwtIncompatible // SerializableTester
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 16K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/base/FunctionsTest.java

          Y expected = null;
          try {
            expected = f.apply(i);
          } catch (IllegalArgumentException e) {
            try {
              g.apply(i);
              fail();
            } catch (IllegalArgumentException ok) {
              continue;
            }
          }
          assertEquals(expected, g.apply(i));
        }
      }
    
      @J2ktIncompatible
      @GwtIncompatible // SerializableTester
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 16K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/escape/UnicodeEscaper.java

          }
        }
        throw new IndexOutOfBoundsException("Index exceeds specified range");
      }
    
      /**
       * Helper method to grow the character buffer as needed, this only happens once in a while so it's
       * ok if it's in a method call. If the index passed in is 0 then no copying will be done.
       */
      private static char[] growBuffer(char[] dest, int index, int size) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 13.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

         * value in the map is the number of occurrences of the key.
         */
        SortedMap<Integer, AtomicInteger> replica = Maps.newTreeMap();
        assertTrue("Empty heap should be OK", mmHeap.isIntact());
        for (int i = 0; i < heapSize; i++) {
          int randomInt = random.nextInt();
          mmHeap.offer(randomInt);
          insertIntoReplica(replica, randomInt);
        }
        assertIntact(mmHeap);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/reflect/InvokableTest.java

              publicMethodSignatures(genericDeclaration, ImmutableSet.<String>of());
          assertThat(invokableMethods).containsAtLeastElementsIn(genericDeclarationMethods);
        } catch (ClassNotFoundException e) {
          // OK: we're on Java 7, which doesn't have this class
        }
      }
    
      private static ImmutableSet<String> publicMethodSignatures(
          Class<?> c, ImmutableSet<String> ignore) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

      }
    
      public void testRemove_noneRemaining() {
        int countToRemove = 30;
        AtomicInteger current = new AtomicInteger(countToRemove);
    
        when(backingMap.get(KEY)).thenReturn(current);
        // it's ok if removal fails: another thread may have done the remove
        when(backingMap.remove(KEY, current)).thenReturn(false);
    
        assertEquals(countToRemove, multiset.remove(KEY, countToRemove));
        assertEquals(0, current.get());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/io/ByteStreams.java

          byte[] buf = new byte[min(bufSize, MAX_ARRAY_LEN - totalLen)];
          bufs.add(buf);
          int off = 0;
          while (off < buf.length) {
            // always OK to fill buf; its size plus the rest of bufs is never more than MAX_ARRAY_LEN
            int r = in.read(buf, off, buf.length - off);
            if (r == -1) {
              return combineBuffers(bufs, totalLen);
            }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
Back to top