Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 24 for isAtMost (0.09 seconds)

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

      public void testNewHashMapWithExpectedSize_wontGrow() throws Exception {
        // before jdk7u40: creates one-bucket table
        // after  jdk7u40: creates empty table
        assertThat(bucketsOf(Maps.newHashMapWithExpectedSize(0))).isAtMost(1);
    
        for (int size = 1; size < 200; size++) {
          assertWontGrow(
              size,
              new HashMap<>(),
              Maps.newHashMapWithExpectedSize(size),
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 63.2K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/collect/SetViewTest.java

       * Set#size()} of at most {@code max}.
       */
      private static void assertMaxSize(SetView<?> set, int max) {
        assertThat(set.maxSize()).isEqualTo(max);
        assertThat(set.size()).isAtMost(max);
      }
    
      /**
       * A {@link Set} that throws {@link NullPointerException} and {@link ClassCastException} from
       * {@link #contains}.
       */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 29.9K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        }
    
        for (ByteSource in : BROKEN_SOURCES) {
          for (ByteSink out : BROKEN_SINKS) {
            int suppressed = runSuppressionFailureTest(in, out);
            assertThat(suppressed).isAtMost(1);
          }
        }
      }
    
      public void testSlice_returnEmptySource() {
        assertEquals(ByteSource.empty(), source.slice(0, 3).slice(4, 3));
      }
    
      /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 15.6K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/hash/HashingTest.java

          countRemaps(r.nextLong(), map);
        }
        for (int shard = 2; shard <= MAX_SHARDS; shard++) {
          // Rough: don't exceed 1.2x the expected number of remaps by more than 20
          assertThat((double) map.get(shard)).isAtMost(1.2 * ITERS / shard + 20);
        }
      }
    
      private void countRemaps(long h, AtomicLongMap<Integer> map) {
        int last = 0;
        for (int shards = 2; shards <= MAX_SHARDS; shards++) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 26.7K bytes
    - Click Count (2)
  5. android/guava-tests/test/com/google/common/math/DoubleMathTest.java

      public void testConstantsMaxFactorial() {
        BigInteger maxDoubleValue = BigDecimal.valueOf(Double.MAX_VALUE).toBigInteger();
        assertThat(BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL)).isAtMost(maxDoubleValue);
        assertThat(BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL + 1))
            .isGreaterThan(maxDoubleValue);
      }
    
      public void testConstantsEverySixteenthFactorial() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Feb 03 16:20:39 GMT 2026
    - 27.5K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

          limiter.setRate(rate);
          long burst = measureTotalTimeMillis(limiter, oneSecWorthOfWork, new Random());
          // we allow one second worth of work to go in a burst (i.e. take less than a second)
          assertThat(burst).isAtMost(1000);
          long afterBurst = measureTotalTimeMillis(limiter, oneSecWorthOfWork, new Random());
          // but work beyond that must take at least one second
          assertThat(afterBurst).isAtLeast(1000);
        }
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 22K bytes
    - Click Count (0)
  7. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

          limiter.setRate(rate);
          long burst = measureTotalTimeMillis(limiter, oneSecWorthOfWork, new Random());
          // we allow one second worth of work to go in a burst (i.e. take less than a second)
          assertThat(burst).isAtMost(1000);
          long afterBurst = measureTotalTimeMillis(limiter, oneSecWorthOfWork, new Random());
          // but work beyond that must take at least one second
          assertThat(afterBurst).isAtLeast(1000);
        }
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 22K bytes
    - Click Count (0)
  8. guava-tests/test/com/google/common/net/InetAddressesTest.java

            InetAddresses.coerceToInteger(
                InetAddresses.getCoercedIPv4Address(InetAddresses.forString("2001:4860::1")));
        assertThat(coercedInt).isAtLeast(0xe0000000);
        assertThat(coercedInt).isAtMost(0xfffffffe);
      }
    
      public void testCoerceToInteger() {
        assertThat(InetAddresses.coerceToInteger(InetAddresses.forString("127.0.0.1")))
            .isEqualTo(0x7f000001);
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 16:38:16 GMT 2026
    - 36.3K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/hash/BloomFilterTest.java

       */
      private static void assertApproximateElementCountGuess(BloomFilter<?> bf, int sizeGuess) {
        assertThat(bf.approximateElementCount()).isAtLeast((long) (sizeGuess * 0.99));
        assertThat(bf.approximateElementCount()).isAtMost((long) (sizeGuess * 1.01));
      }
    
      public void testCreateAndCheckMitz32BloomFilterWithKnownFalsePositives() {
        int numInsertions = 1000000;
        BloomFilter<String> bf =
            BloomFilter.create(
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 23K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/math/DoubleMathTest.java

      public void testConstantsMaxFactorial() {
        BigInteger maxDoubleValue = BigDecimal.valueOf(Double.MAX_VALUE).toBigInteger();
        assertThat(BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL)).isAtMost(maxDoubleValue);
        assertThat(BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL + 1))
            .isGreaterThan(maxDoubleValue);
      }
    
      public void testConstantsEverySixteenthFactorial() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Feb 03 16:20:39 GMT 2026
    - 27.5K bytes
    - Click Count (0)
Back to Top