123456789101112131415161718192021222324252627282930 |
- package yu_pack
- import (
- "fmt"
- "testing"
- )
- func TestPack_SetBytes(t *testing.T) {
- j_pack := New()
- j_pack.PushString("asdsa")
- j_pack.PushString("asdsa")
- j_pack.PushString("asdsa")
- j_pack.PushString("asdsa")
- j_s := j_pack.String()
- j_ss, _ := j_pack.PopString(6)
- fmt.Println(j_s, j_ss)
- j_pack.Reset()
- j_pack.PushString("123123")
- j_pack.PushString("123123")
- j_pack.PushString("3213123")
- j_pack.PushString("312312")
- fmt.Println(j_s, j_ss)
- j_s = j_pack.String()
- j_ss, _ = j_pack.PopString(6)
- fmt.Println(j_s, j_ss)
- j_pack.Reset().PushInt16B(0x0810, 0x0307, 0x0387)
- fmt.Println(j_pack.Bytes())
- }
|