Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for testByteArrayRoundTrips (0.12 sec)

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

        assertThat(Chars.fromBytes((byte) 0xFE, (byte) 0xDC)).isEqualTo('\uFEDC');
      }
    
      @GwtIncompatible // Chars.fromByteArray, Chars.toByteArray
      public void testByteArrayRoundTrips() {
        char c = 0;
        for (int hi = 0; hi < 256; hi++) {
          for (int lo = 0; lo < 256; lo++) {
            char result = Chars.fromByteArray(new byte[] {(byte) hi, (byte) lo});
            assertWithMessage(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/primitives/IntsTest.java

            .isEqualTo(0x12131415);
        assertThat(Ints.fromBytes((byte) 0xFF, (byte) 0xEE, (byte) 0xDD, (byte) 0xCC))
            .isEqualTo(0xFFEEDDCC);
      }
    
      public void testByteArrayRoundTrips() {
        Random r = new Random(5);
        byte[] b = new byte[Ints.BYTES];
    
        // total overkill, but, it takes 0.1 sec so why not...
        for (int i = 0; i < 10000; i++) {
          int num = r.nextInt();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 29.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/primitives/LongsTest.java

                    (byte) 0xBB,
                    (byte) 0xAA,
                    (byte) 0x99,
                    (byte) 0x88))
            .isEqualTo(0xFFEEDDCCBBAA9988L);
      }
    
      public void testByteArrayRoundTrips() {
        Random r = new Random(5);
        byte[] b = new byte[Longs.BYTES];
    
        for (int i = 0; i < 1000; i++) {
          long num = r.nextLong();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 29.8K bytes
    - Viewed (0)
Back to top