- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for TestEncode (0.12 sec)
-
src/encoding/hex/hex_test.go
{"f0f1f2f3f4f5f6f7", []byte{0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7}}, {"f8f9fafbfcfdfeff", []byte{0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff}}, {"67", []byte{'g'}}, {"e3a1", []byte{0xe3, 0xa1}}, } func TestEncode(t *testing.T) { for i, test := range encDecTests { dst := make([]byte, EncodedLen(len(test.dec))) n := Encode(dst, test.dec) if n != len(dst) { t.Errorf("#%d: bad return value: got: %d want: %d", i, n, len(dst))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 19:30:23 UTC 2024 - 7.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor_test.go
func (p anyObject) MarshalCBOR() ([]byte, error) { return modes.Encode.Marshal(p.Value) } func (p *anyObject) UnmarshalCBOR(in []byte) error { return modes.Decode.Unmarshal(in, &p.Value) } func TestEncode(t *testing.T) { for _, tc := range []struct { name string in runtime.Object assertOnWriter func() (io.Writer, func(*testing.T)) assertOnError func(*testing.T, error) }{ {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 13 14:57:12 UTC 2024 - 20.1K bytes - Viewed (0) -
src/encoding/base32/base32_test.go
} func testEqual(t *testing.T, msg string, args ...any) bool { t.Helper() if args[len(args)-2] != args[len(args)-1] { t.Errorf(msg, args...) return false } return true } func TestEncode(t *testing.T) { for _, p := range pairs { got := StdEncoding.EncodeToString([]byte(p.decoded)) testEqual(t, "Encode(%q) = %q, want %q", p.decoded, got, p.encoded)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 16:25:54 UTC 2024 - 26K bytes - Viewed (0)