Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for testFloorPowerOfTwo (0.21 sec)

  1. android/guava-tests/test/com/google/common/math/IntMathTest.java

            try {
              IntMath.ceilingPowerOfTwo(x);
              fail("Expected ArithmeticException");
            } catch (ArithmeticException expected) {
            }
          }
        }
      }
    
      public void testFloorPowerOfTwo() {
        for (int x : POSITIVE_INTEGER_CANDIDATES) {
          BigInteger expectedResult = BigIntegerMath.floorPowerOfTwo(BigInteger.valueOf(x));
          assertEquals(expectedResult.intValue(), IntMath.floorPowerOfTwo(x));
        }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 24.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

          assertTrue(BigIntegerMath.isPowerOfTwo(result));
          assertTrue(result.compareTo(x) >= 0);
          assertTrue(result.compareTo(x.add(x)) < 0);
        }
      }
    
      public void testFloorPowerOfTwo() {
        for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) {
          BigInteger result = BigIntegerMath.floorPowerOfTwo(x);
          assertTrue(BigIntegerMath.isPowerOfTwo(result));
          assertTrue(result.compareTo(x) <= 0);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 17 17:58:33 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/LongMathTest.java

            try {
              LongMath.ceilingPowerOfTwo(x);
              fail("Expected ArithmeticException");
            } catch (ArithmeticException expected) {
            }
          }
        }
      }
    
      public void testFloorPowerOfTwo() {
        for (long x : POSITIVE_LONG_CANDIDATES) {
          BigInteger expectedResult = BigIntegerMath.floorPowerOfTwo(BigInteger.valueOf(x));
          assertEquals(expectedResult.longValue(), LongMath.floorPowerOfTwo(x));
        }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Mar 04 20:15:57 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/LongMathTest.java

            try {
              LongMath.ceilingPowerOfTwo(x);
              fail("Expected ArithmeticException");
            } catch (ArithmeticException expected) {
            }
          }
        }
      }
    
      public void testFloorPowerOfTwo() {
        for (long x : POSITIVE_LONG_CANDIDATES) {
          BigInteger expectedResult = BigIntegerMath.floorPowerOfTwo(BigInteger.valueOf(x));
          assertEquals(expectedResult.longValue(), LongMath.floorPowerOfTwo(x));
        }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Mar 04 20:15:57 UTC 2024
    - 32.5K bytes
    - Viewed (0)
Back to top