Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for TestCompare (0.22 sec)

  1. src/bytes/compare_test.go

    	{[]byte("abcdefghj"), []byte("abcdefghi"), 1},
    	// nil tests
    	{nil, nil, 0},
    	{[]byte(""), nil, 0},
    	{nil, []byte(""), 0},
    	{[]byte("a"), nil, 1},
    	{nil, []byte("a"), -1},
    }
    
    func TestCompare(t *testing.T) {
    	for _, tt := range compareTests {
    		numShifts := 16
    		buffer := make([]byte, len(tt.b)+numShifts)
    		// vary the input alignment of tt.b
    		for offset := 0; offset <= numShifts; offset++ {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jul 13 23:11:42 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

          assertWithMessage(value + " not found in exception text: " + 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++) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/SignedBytesTest.java

          assertWithMessage(value + " not found in exception text: " + ex.getMessage())
              .that(ex.getMessage().contains(String.valueOf(value)))
              .isTrue();
        }
      }
    
      public void testCompare() {
        for (byte x : VALUES) {
          for (byte y : VALUES) {
            // Only compare the sign of the result of compareTo().
            int expected = Byte.valueOf(x).compareTo(y);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/primitives/UnsignedIntegerTest.java

          try {
            UnsignedInteger.fromIntBits(a).mod(UnsignedInteger.ZERO);
            fail("Expected ArithmeticException");
          } catch (ArithmeticException expected) {
          }
        }
      }
    
      public void testCompare() {
        for (int a : TEST_INTS) {
          for (int b : TEST_INTS) {
            UnsignedInteger aUnsigned = UnsignedInteger.fromIntBits(a);
            UnsignedInteger bUnsigned = UnsignedInteger.fromIntBits(b);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 9.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

          try {
            UnsignedLong.fromLongBits(a).mod(UnsignedLong.ZERO);
            fail("Expected ArithmeticException");
          } catch (ArithmeticException expected) {
          }
        }
      }
    
      public void testCompare() {
        for (long a : TEST_LONGS) {
          for (long b : TEST_LONGS) {
            UnsignedLong aUnsigned = UnsignedLong.fromLongBits(a);
            UnsignedLong bUnsigned = UnsignedLong.fromLongBits(b);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/primitives/SignedBytesTest.java

          assertWithMessage(value + " not found in exception text: " + ex.getMessage())
              .that(ex.getMessage().contains(String.valueOf(value)))
              .isTrue();
        }
      }
    
      public void testCompare() {
        for (byte x : VALUES) {
          for (byte y : VALUES) {
            // Only compare the sign of the result of compareTo().
            int expected = Byte.valueOf(x).compareTo(y);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

          try {
            UnsignedLong.fromLongBits(a).mod(UnsignedLong.ZERO);
            fail("Expected ArithmeticException");
          } catch (ArithmeticException expected) {
          }
        }
      }
    
      public void testCompare() {
        for (long a : TEST_LONGS) {
          for (long b : TEST_LONGS) {
            UnsignedLong aUnsigned = UnsignedLong.fromLongBits(a);
            UnsignedLong bUnsigned = UnsignedLong.fromLongBits(b);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/primitives/UnsignedIntegerTest.java

          try {
            UnsignedInteger.fromIntBits(a).mod(UnsignedInteger.ZERO);
            fail("Expected ArithmeticException");
          } catch (ArithmeticException expected) {
          }
        }
      }
    
      public void testCompare() {
        for (int a : TEST_INTS) {
          for (int b : TEST_INTS) {
            UnsignedInteger aUnsigned = UnsignedInteger.fromIntBits(a);
            UnsignedInteger bUnsigned = UnsignedInteger.fromIntBits(b);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 9.6K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

     */
    @GwtCompatible(emulated = true)
    public class UnsignedLongsTest extends TestCase {
      private static final long LEAST = 0L;
      private static final long GREATEST = 0xffffffffffffffffL;
    
      public void testCompare() {
        // max value
        assertThat(UnsignedLongs.compare(0, 0xffffffffffffffffL)).isLessThan(0);
        assertThat(UnsignedLongs.compare(0xffffffffffffffffL, 0)).isGreaterThan(0);
    
        // both with high bit set
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  10. 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 = Longs.compare(a, b);
            int cmpAsUInt = UnsignedInts.compare((int) a, (int) b);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 12.7K bytes
    - Viewed (0)
Back to top