Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 407 for Pytest (0.14 sec)

  1. android/guava/src/com/google/common/primitives/Bytes.java

    /**
     * Static utility methods pertaining to {@code byte} primitives, that are not already found in
     * either {@link Byte} or {@link Arrays}, <i>and interpret bytes as neither signed nor unsigned</i>.
     * The methods which specifically treat bytes as signed or unsigned are found in {@link SignedBytes}
     * and {@link UnsignedBytes}.
     *
     * <p>See the Guava User Guide article on <a
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/HashCodeTest.java

        // These will have the same first 4 bytes (all 0).
        byte[] bytesA = new byte[5];
        byte[] bytesB = new byte[5];
    
        // Change only the last (5th) byte
        bytesA[4] = (byte) 0xbe;
        bytesB[4] = (byte) 0xef;
    
        HashCode hashCodeA = HashCode.fromBytes(bytesA);
        HashCode hashCodeB = HashCode.fromBytes(bytesB);
    
        // They aren't equal...
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/base/ToStringHelperTest.java

        assertEquals("{}", toTest);
      }
    
      public void testConstructorLenient_anonymousClass() {
        String toTest = MoreObjects.toStringHelper(new Object() {}).toString();
        assertTrue(toTest, toTest.matches(".*\\{\\}"));
      }
    
      @GwtIncompatible // Class names are obfuscated in GWT
      public void testConstructor_classObject() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:24:55 GMT 2024
    - 15.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/ListsImplTest.java

        }
        int[] expected = {3, 1, 5, 3, 4, 5};
        checkLastIndexOf(toTest, expected);
      }
    
      private void checkIndexOf(List<?> toTest, int[] expected) {
        int index = 0;
        for (Object obj : toTest) {
          String name = "toTest[" + index + "] (" + obj + ")";
          assertWithMessage(name).that(Lists.indexOfImpl(toTest, obj)).isEqualTo(expected[index]);
          index++;
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 26 16:35:21 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/hash/MessageDigestHashFunction.java

      }
    
      MessageDigestHashFunction(String algorithmName, int bytes, String toString) {
        this.toString = checkNotNull(toString);
        this.prototype = getMessageDigest(algorithmName);
        int maxLength = prototype.getDigestLength();
        checkArgument(
            bytes >= 4 && bytes <= maxLength, "bytes (%s) must be >= 4 and < %s", bytes, maxLength);
        this.bytes = bytes;
        this.supportsClone = supportsClone(prototype);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 25 20:32:46 GMT 2022
    - 5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/base/Utf8.java

       * well-formed.
       *
       * <p>This method returns {@code true} if and only if {@code Arrays.equals(bytes, new
       * String(bytes, UTF_8).getBytes(UTF_8))} does, but is more efficient in both time and space.
       */
      public static boolean isWellFormed(byte[] bytes) {
        return isWellFormed(bytes, 0, bytes.length);
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 10 14:11:51 GMT 2023
    - 7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/base/Utf8Test.java

      }
    
      private static byte[] toByteArray(int... bytes) {
        byte[] realBytes = new byte[bytes.length];
        for (int i = 0; i < bytes.length; i++) {
          realBytes[i] = (byte) bytes[i];
        }
        return realBytes;
      }
    
      private static void assertWellFormed(int... bytes) {
        assertTrue(Utf8.isWellFormed(toByteArray(bytes)));
      }
    
      private static void assertNotWellFormed(int... bytes) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  8. src/test/java/jcifs/tests/PACTest.java

            }
            else {
                javaChecksum = sun.security.krb5.internal.crypto.Aes256.calculateChecksum(keybytes, usage, bytes, 0, bytes.length);
            }
    
            byte[] mac = PacMac.calculateMacHMACAES(usage, makeKey(keybytes, keybytes.length == 16 ? 17 : 18), bytes);
            checkBytes(javaChecksum, mac);
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Oct 01 12:01:17 GMT 2023
    - 22.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/ChecksumHashFunctionTest.java

        byte[] bytes = HashTestUtils.ascii(input);
    
        Checksum checksum = supplier.get();
        checksum.update(bytes, 0, bytes.length);
        long value = checksum.getValue();
    
        String toString = "name";
        HashFunction func = new ChecksumHashFunction(supplier, 32, toString);
        assertEquals(toString, func.toString());
        assertEquals(value, func.hashBytes(bytes).padToLong());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 30 14:33:12 GMT 2018
    - 3.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/io/ByteSinkTest.java

      }
    
      public void testWrite_bytes() throws IOException {
        assertArrayEquals(new byte[0], sink.getBytes());
        sink.write(bytes);
    
        assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed());
        assertArrayEquals(bytes, sink.getBytes());
      }
    
      public void testWriteFrom_inputStream() throws IOException {
        ByteArrayInputStream in = new ByteArrayInputStream(bytes);
        sink.writeFrom(in);
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
Back to top