Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for testBytes (0.18 sec)

  1. android/guava-tests/test/com/google/common/hash/HashingInputStreamTest.java

        byte[] buf = new byte[4];
        int numOfByteRead = in.read(buf, 0, buf.length);
        assertEquals(4, numOfByteRead);
        for (int i = 0; i < testBytes.length; i++) {
          assertEquals(testBytes[i], buf[i]);
        }
    
        verify(hasher).putBytes(testBytes, 0, testBytes.length);
        verify(hashFunction).newHasher();
        verifyNoMoreInteractions(hashFunction, hasher);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/HashingInputStreamTest.java

        byte[] buf = new byte[4];
        int numOfByteRead = in.read(buf, 0, buf.length);
        assertEquals(4, numOfByteRead);
        for (int i = 0; i < testBytes.length; i++) {
          assertEquals(testBytes[i], buf[i]);
        }
    
        verify(hasher).putBytes(testBytes, 0, testBytes.length);
        verify(hashFunction).newHasher();
        verifyNoMoreInteractions(hashFunction, hasher);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java

      private byte[] testBytes;
    
      @BeforeExperiment
      void setUp() {
        testBytes = new byte[size];
        random.nextBytes(testBytes);
      }
    
      @Benchmark
      int hasher(int reps) {
        HashFunction hashFunction = hashFunctionEnum.getHashFunction();
        int result = 37;
        for (int i = 0; i < reps; i++) {
          result ^= hashFunction.newHasher().putBytes(testBytes).hash().asBytes()[0];
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.3K bytes
    - Viewed (0)
  4. guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

      private static final int RANDOM_SEED = new Random().nextInt();
    
      @Param({"10", "1000", "100000", "1000000"})
      private int size;
    
      private byte[] testBytes;
    
      @BeforeExperiment
      void setUp() {
        testBytes = new byte[size];
        new Random(RANDOM_SEED).nextBytes(testBytes);
      }
    
      // CRC32
    
      @Benchmark
      byte crc32HashFunction(int reps) {
        return runHashFunction(reps, Hashing.crc32());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jun 13 16:19:15 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

      private static final int RANDOM_SEED = new Random().nextInt();
    
      @Param({"10", "1000", "100000", "1000000"})
      private int size;
    
      private byte[] testBytes;
    
      @BeforeExperiment
      void setUp() {
        testBytes = new byte[size];
        new Random(RANDOM_SEED).nextBytes(testBytes);
      }
    
      // CRC32
    
      @Benchmark
      byte crc32HashFunction(int reps) {
        return runHashFunction(reps, Hashing.crc32());
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 13 16:19:15 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  6. android/guava-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java

      private byte[] testBytes;
    
      @BeforeExperiment
      void setUp() {
        testBytes = new byte[size];
        random.nextBytes(testBytes);
      }
    
      @Benchmark
      int hasher(int reps) {
        HashFunction hashFunction = hashFunctionEnum.getHashFunction();
        int result = 37;
        for (int i = 0; i < reps; i++) {
          result ^= hashFunction.newHasher().putBytes(testBytes).hash().asBytes()[0];
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.3K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java

      private static final int RANDOM_SEED = new Random().nextInt();
    
      private byte[] testBytes;
    
      @BeforeExperiment
      void setUp() {
        testBytes = new byte[size];
        new Random(RANDOM_SEED).nextBytes(testBytes);
      }
    
      @Benchmark
      byte hashing(int reps) {
        byte result = 0x01;
        HashMethod hashMethod = this.hashMethod;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.5K bytes
    - Viewed (0)
  8. src/bytes/buffer_test.go

    var testString string // test data for write tests
    var testBytes []byte  // test data; same as testString but as a slice.
    
    type negativeReader struct{}
    
    func (r *negativeReader) Read([]byte) (int, error) { return -1, nil }
    
    func init() {
    	testBytes = make([]byte, N)
    	for i := 0; i < N; i++ {
    		testBytes[i] = 'a' + byte(i%26)
    	}
    	testString = string(testBytes)
    }
    
    // Verify that contents of buf match the string s.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 20 01:07:29 GMT 2023
    - 18.1K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java

      private static final int RANDOM_SEED = new Random().nextInt();
    
      private byte[] testBytes;
    
      @BeforeExperiment
      void setUp() {
        testBytes = new byte[size];
        new Random(RANDOM_SEED).nextBytes(testBytes);
      }
    
      @Benchmark
      byte hashing(int reps) {
        byte result = 0x01;
        HashMethod hashMethod = this.hashMethod;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/base/Utf8Test.java

      @GwtIncompatible // java.nio.charset.Charset
      public void testIsWellFormed_1Byte() {
        testBytes(1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT);
      }
    
      /** Tests that round tripping of all two byte permutations work. */
      @GwtIncompatible // java.nio.charset.Charset
      public void testIsWellFormed_2Bytes() {
        testBytes(2, EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.7K bytes
    - Viewed (0)
Back to top