- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for TestEncode (0.14 sec)
-
src/test/java/org/codelibs/core/net/URLUtilTest.java
import java.net.URL; import junit.framework.TestCase; /** * @author taichi * */ public class URLUtilTest extends TestCase { /** * @throws Exception */ public void testEncode() throws Exception { assertEquals("Program+Files", URLUtil.encode("Program Files", "UTF-8")); } /** * @throws Exception */ public void testDecode() throws Exception {
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 1.9K bytes - Viewed (0) -
src/test/java/org/codelibs/core/misc/Base64UtilTest.java
private static final byte[] BINARY_DATA = ORIGINAL.getBytes(); private static final String ENCODED_DATA = "aG93IG5vdyBicm93biBjb3cNCg=="; /** * @throws Exception */ public void testEncode() throws Exception { assertEquals("1", ENCODED_DATA, Base64Util.encode(BINARY_DATA)); System.out.println(Base64Util.encode(new byte[] { 'a', 'b', 'c' })); } /** * @throws Exception
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 1.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/encode_test.go
limitations under the License. */ package modes_test import ( "fmt" "testing" "github.com/fxamacker/cbor/v2" "github.com/google/go-cmp/cmp" ) func TestEncode(t *testing.T) { for _, tc := range []struct { name string modes []cbor.EncMode in interface{} want []byte assertOnError func(t *testing.T, e error) }{ {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 04 15:55:02 UTC 2024 - 2K bytes - Viewed (0) -
src/unicode/utf16/utf16_test.go
{[]rune{'a', 'b', 0xd7ff, 0xd800, 0xdfff, 0xe000, 0x110000, -1}, []uint16{'a', 'b', 0xd7ff, 0xfffd, 0xfffd, 0xe000, 0xfffd, 0xfffd}}, } func TestEncode(t *testing.T) { for _, tt := range encodeTests { out := Encode(tt.in) if !reflect.DeepEqual(out, tt.out) { t.Errorf("Encode(%x) = %x; want %x", tt.in, out, tt.out) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 19:08:48 UTC 2024 - 6.5K bytes - Viewed (0) -
src/encoding/ascii85/ascii85_test.go
} func strip85(s string) string { t := make([]byte, len(s)) w := 0 for r := 0; r < len(s); r++ { c := s[r] if c > ' ' { t[w] = c w++ } } return string(t[0:w]) } func TestEncode(t *testing.T) { for _, p := range pairs { buf := make([]byte, MaxEncodedLen(len(p.decoded))) n := Encode(buf, []byte(p.decoded)) buf = buf[0:n]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 15:46:20 UTC 2022 - 5.8K bytes - Viewed (0) -
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/test/runtime_serializer_protobuf_protobuf_test.go
} for i, data := range recognizes { if ok, _, err := s.RecognizesData(data); err != nil || !ok { t.Errorf("%d: should recognize data: %v", i, err) } } } func TestEncode(t *testing.T) { obj1 := &testMarshalable{testObject: testObject{}, data: []byte{}} wire1 := []byte{ 0x6b, 0x38, 0x73, 0x00, // prefix 0x0a, 0x04, 0x0a, 0x00, // apiversion 0x12, 0x00, // kind
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:16 UTC 2023 - 8.9K bytes - Viewed (0) -
src/encoding/base64/base64_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 { for _, tt := range encodingTests { got := tt.enc.EncodeToString([]byte(p.decoded)) testEqual(t, "Encode(%q) = %q, want %q", p.decoded, got, tt.conv(p.encoded))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Sep 03 18:57:29 UTC 2023 - 15.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/pem/pem_test.go
result, rest := Decode(input) if result != nil || !reflect.DeepEqual(rest, input) { t.Errorf("Encode of %#v decoded as %#v", input, rest) } } func TestEncode(t *testing.T) { r := EncodeToMemory(privateKey2) if string(r) != pemPrivateKey2 { t.Errorf("got:%s want:%s", r, pemPrivateKey2) } } type lineBreakerTest struct { in, out string }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 29 22:56:00 UTC 2022 - 23.5K bytes - Viewed (0)