Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 224 for maxValue (0.04 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilCommon.kt

    /**
     * Returns this as a non-negative integer, or 0 if it is negative, or [Int.MAX_VALUE] if it is too
     * large, or [defaultValue] if it cannot be parsed.
     */
    internal fun String?.toNonNegativeInt(defaultValue: Int): Int {
      try {
        val value = this?.toLong() ?: return defaultValue
        return when {
          value > Int.MAX_VALUE -> Int.MAX_VALUE
          value < 0 -> 0
          else -> value.toInt()
        }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 10.1K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

      var uriHost: String = "example.com"
      var uriPort: Int = 1
    
      fun newConnection(
        pool: RealConnectionPool,
        route: Route,
        idleAtNanos: Long = Long.MAX_VALUE,
        taskRunner: TaskRunner = this.taskRunner,
      ): RealConnection {
        val result =
          RealConnection.newTestConnection(
            taskRunner = taskRunner,
            connectionPool = pool,
            route = route,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri May 30 21:28:20 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/CacheControlJvmTest.kt

      fun timeDurationTruncatedToMaxValue() {
        val cacheControl =
          CacheControl
            .Builder()
            .maxAge(365 * 100, TimeUnit.DAYS) // Longer than Integer.MAX_VALUE seconds.
            .build()
        assertThat(cacheControl.maxAgeSeconds).isEqualTo(Int.MAX_VALUE)
      }
    
      @Test
      @Throws(Exception::class)
      fun secondsMustBeNonNegative() {
        val builder = CacheControl.Builder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/math/IntMathTest.java

          int n = rand.nextInt(Integer.MAX_VALUE);
          assertEquals(LongMath.isPrime(n), IntMath.isPrime(n));
        }
      }
    
      public void testSaturatedAbs() {
        assertEquals(Integer.MAX_VALUE, IntMath.saturatedAbs(Integer.MIN_VALUE));
        assertEquals(Integer.MAX_VALUE, IntMath.saturatedAbs(Integer.MAX_VALUE));
        assertEquals(Integer.MAX_VALUE, IntMath.saturatedAbs(-Integer.MAX_VALUE));
        assertEquals(0, IntMath.saturatedAbs(0));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 24.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            ImmutableList.of(
                Striped.lazyWeakLock(Integer.MAX_VALUE),
                Striped.lazyWeakSemaphore(Integer.MAX_VALUE, Integer.MAX_VALUE),
                Striped.lazyWeakReadWriteLock(Integer.MAX_VALUE))) {
          for (int i = 0; i < 3; i++) {
            // doesn't throw exception
            Object unused = striped.getAt(Integer.MAX_VALUE - i);
          }
        }
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            ImmutableList.of(
                Striped.lazyWeakLock(Integer.MAX_VALUE),
                Striped.lazyWeakSemaphore(Integer.MAX_VALUE, Integer.MAX_VALUE),
                Striped.lazyWeakReadWriteLock(Integer.MAX_VALUE))) {
          for (int i = 0; i < 3; i++) {
            // doesn't throw exception
            Object unused = striped.getAt(Integer.MAX_VALUE - i);
          }
        }
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/SettingsTest.kt

    class SettingsTest {
      @Test
      fun unsetField() {
        val settings = Settings()
        assertThat(settings.isSet(Settings.MAX_CONCURRENT_STREAMS)).isFalse()
        assertThat(settings.getMaxConcurrentStreams()).isEqualTo(Int.MAX_VALUE)
      }
    
      @Test
      fun setFields() {
        val settings = Settings()
        settings[Settings.HEADER_TABLE_SIZE] = 8096
        assertThat(settings.headerTableSize).isEqualTo(8096)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/primitives/LongsTest.java

                new long[] {MIN_VALUE, 1L},
                new long[] {1L},
                new long[] {1L, MIN_VALUE},
                new long[] {MAX_VALUE, MAX_VALUE - 1L},
                new long[] {MAX_VALUE, MAX_VALUE},
                new long[] {MAX_VALUE, MAX_VALUE, MAX_VALUE});
    
        Comparator<long[]> comparator = Longs.lexicographicalComparator();
        Helpers.testComparator(comparator, ordered);
      }
    
      @J2ktIncompatible
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 28.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

        new RoundToDoubleTester(maxDoubleAsBigInteger)
            .setExpectation(Double.MAX_VALUE, values())
            .test();
      }
    
      @J2ktIncompatible
      @GwtIncompatible
      public void testRoundToDouble_maxDoublePlusOne() {
        BigInteger maxDoubleAsBigInteger =
            DoubleMath.roundToBigInteger(Double.MAX_VALUE, UNNECESSARY).add(BigInteger.ONE);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 27K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/google/MultisetAddTester.java

      }
    
      @CollectionFeature.Require(SUPPORTS_ADD)
      public void testAddTooMany() {
        getMultiset().add(e3(), Integer.MAX_VALUE);
        assertThrows(IllegalArgumentException.class, () -> getMultiset().add(e3()));
        assertEquals(Integer.MAX_VALUE, getMultiset().count(e3()));
        assertEquals(Integer.MAX_VALUE, getMultiset().size());
      }
    
      @CollectionFeature.Require(SUPPORTS_ADD)
      public void testAddAll_emptySet() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Nov 14 23:40:07 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top