- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for TestBytes (0.32 sec)
-
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) -
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) -
src/reflect/all_test.go
for _, tt := range tagGetTests { if v := tt.Tag.Get(tt.Key); v != tt.Value { t.Errorf("StructTag(%#q).Get(%#q) = %#q, want %#q", tt.Tag, tt.Key, v, tt.Value) } } } func TestBytes(t *testing.T) { shouldPanic("on int Value", func() { ValueOf(0).Bytes() }) shouldPanic("of non-byte slice", func() { ValueOf([]string{}).Bytes() }) type S []byte x := S{1, 2, 3, 4}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 218.8K bytes - Viewed (0)