Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for TestBytes (0.24 sec)

  1. 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];
        }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.3K bytes
    - Viewed (0)
  2. 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());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 13 16:19:15 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  3. 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);
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Oct 02 16:24:50 UTC 2020
    - 5K bytes
    - Viewed (0)
  4. 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);
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Oct 02 16:24:50 UTC 2020
    - 5K bytes
    - Viewed (0)
  5. 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());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 13 16:19:15 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  6. 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.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:31:36 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  7. 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;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.5K bytes
    - Viewed (0)
  8. 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;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.5K bytes
    - Viewed (0)
  9. pkg/util/tail/tail_test.go

    	if err != nil {
    		t.Fatalf("unable to create temp file")
    	}
    	defer os.Remove(file.Name())
    
    	line := strings.Repeat("a", blockSize)
    	testBytes := []byte(line + "\n" +
    		line + "\n" +
    		line + "\n" +
    		line + "\n" +
    		line[blockSize/2:]) // incomplete line
    
    	file.Write(testBytes)
    	testCases := []struct {
    		name          string
    		max           int64
    		longerThanMax bool
    		expected      string
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 13:13:22 UTC 2024
    - 2.3K 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);
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Feb 09 15:49:48 UTC 2024
    - 12.7K bytes
    - Viewed (0)
Back to top