Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for TestCompare (0.05 sec)

  1. guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

      public void testModByZero() {
        for (long a : TEST_LONGS) {
          assertThrows(
              ArithmeticException.class, () -> UnsignedLong.fromLongBits(a).mod(UnsignedLong.ZERO));
        }
      }
    
      public void testCompare() {
        for (long a : TEST_LONGS) {
          for (long b : TEST_LONGS) {
            UnsignedLong aUnsigned = UnsignedLong.fromLongBits(a);
            UnsignedLong bUnsigned = UnsignedLong.fromLongBits(b);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

      public void testModByZero() {
        for (long a : TEST_LONGS) {
          assertThrows(
              ArithmeticException.class, () -> UnsignedLong.fromLongBits(a).mod(UnsignedLong.ZERO));
        }
      }
    
      public void testCompare() {
        for (long a : TEST_LONGS) {
          for (long b : TEST_LONGS) {
            UnsignedLong aUnsigned = UnsignedLong.fromLongBits(a);
            UnsignedLong bUnsigned = UnsignedLong.fromLongBits(b);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

      }
    
      public void testToLong() {
        for (long a : UNSIGNED_INTS) {
          assertThat(UnsignedInts.toLong((int) a)).isEqualTo(a);
        }
      }
    
      public void testCompare() {
        for (long a : UNSIGNED_INTS) {
          for (long b : UNSIGNED_INTS) {
            int cmpAsLongs = Long.compare(a, b);
            int cmpAsUInt = UnsignedInts.compare((int) a, (int) b);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

          assertWithMessage("%s not found in exception text: %s", value, ex.getMessage())
              .that(ex.getMessage().contains(String.valueOf(value)))
              .isTrue();
        }
      }
    
      public void testCompare() {
        // This is the only ordering for primitives that does not have a
        // corresponding Comparable wrapper in java.lang.
        for (int i = 0; i < VALUES.length; i++) {
          for (int j = 0; j < VALUES.length; j++) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 13.5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/primitives/CharsTest.java

              .that(ex.getMessage().contains(String.valueOf(value)))
              .isTrue();
        }
      }
    
      // We need to test that our method behaves like the JDK method.
      @SuppressWarnings("InlineMeInliner")
      public void testCompare() {
        for (char x : VALUES) {
          for (char y : VALUES) {
            assertWithMessage("%s, %s", x, y)
                .that(Math.signum(Chars.compare(x, y)))
                .isEqualTo(Math.signum(Character.compare(x, y)));
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 25.9K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/BooleansTest.java

        assertThat(Booleans.falseFirst().compare(true, false)).isGreaterThan(0);
      }
    
      // We need to test that our method behaves like the JDK method.
      @SuppressWarnings("InlineMeInliner")
      public void testCompare() {
        for (boolean x : VALUES) {
          for (boolean y : VALUES) {
            // note: spec requires only that the sign is the same
            assertWithMessage("%s, %s", x, y)
                .that(Booleans.compare(x, y))
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 22:56:33 UTC 2025
    - 25.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/primitives/DoublesTest.java

          assertThat(Doubles.isFinite(value)).isEqualTo(Double.isFinite(value));
        }
      }
    
      // We need to test that our method behaves like the JDK method.
      @SuppressWarnings("InlineMeInliner")
      public void testCompare() {
        for (double x : VALUES) {
          for (double y : VALUES) {
            // note: spec requires only that the sign is the same
            assertWithMessage("%s, %s", x, y)
                .that(Doubles.compare(x, y))
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 30.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/primitives/IntsTest.java

              .isTrue();
        }
      }
    
      // We need to test that our method behaves like the JDK method.
      @SuppressWarnings("InlineMeInliner")
      public void testCompare() {
        for (int x : VALUES) {
          for (int y : VALUES) {
            // note: spec requires only that the sign is the same
            assertWithMessage("%s, %s", x, y).that(Ints.compare(x, y)).isEqualTo(Integer.compare(x, y));
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 29.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/primitives/ShortsTest.java

              .isTrue();
        }
      }
    
      // We need to test that our method behaves like the JDK method.
      @SuppressWarnings("InlineMeInliner")
      public void testCompare() {
        for (short x : VALUES) {
          for (short y : VALUES) {
            // Only compare the sign of the result of compare().
            int expected = Short.compare(x, y);
            int actual = Shorts.compare(x, y);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 27.5K bytes
    - Viewed (0)
Back to top