- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for TestBytes (0.2 sec)
-
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) -
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) -
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) -
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) -
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) -
android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
import java.util.Random; import junit.framework.TestCase; /** * Tests for AbstractByteHasher. * * @author Colin Decker */ public class AbstractByteHasherTest extends TestCase { public void testBytes() { TestHasher hasher = new TestHasher(); // byte order insignificant here byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8}; hasher.putByte((byte) 1); hasher.putBytes(new byte[] {2, 3, 4, 5, 6});
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
import java.util.Random; import junit.framework.TestCase; /** * Tests for AbstractStreamingHasher. * * @author Dimitris Andreou */ public class AbstractStreamingHasherTest extends TestCase { public void testBytes() { Sink sink = new Sink(4); // byte order insignificant here byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8}; sink.putByte((byte) 1); sink.putBytes(new byte[] {2, 3, 4, 5, 6}); sink.putByte((byte) 7);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 8.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
import java.util.Random; import junit.framework.TestCase; /** * Tests for AbstractStreamingHasher. * * @author Dimitris Andreou */ public class AbstractStreamingHasherTest extends TestCase { public void testBytes() { Sink sink = new Sink(4); // byte order insignificant here byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8}; sink.putByte((byte) 1); sink.putBytes(new byte[] {2, 3, 4, 5, 6}); sink.putByte((byte) 7);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 8.5K bytes - Viewed (0) -
src/go/constant/value_test.go
} } } var bytesTests = []string{ "0", "1", "123456789", "123456789012345678901234567890123456789012345678901234567890", } func TestBytes(t *testing.T) { for _, test := range bytesTests { x := val(test) bytes := Bytes(x) // special case 0 if Sign(x) == 0 && len(bytes) != 0 { t.Errorf("%s: got %v; want empty byte slice", test, bytes)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 15.6K bytes - Viewed (0) -
src/math/big/int_test.go
// trim leading zero bytes since Bytes() won't return them // (was issue 12231) for len(b) > 0 && b[0] == 0 { b = b[1:] } b2 := new(Int).SetBytes(b).Bytes() return bytes.Equal(b, b2) } func TestBytes(t *testing.T) { if err := quick.Check(checkBytes, nil); err != nil { t.Error(err) } } func checkQuo(x, y []byte) bool { u := new(Int).SetBytes(x) v := new(Int).SetBytes(y)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 58.5K bytes - Viewed (0)