message-size-increase #3

Open
sashakoshka wants to merge 209 commits from message-size-increase into main
Showing only changes of commit 96c8d7924f - Show all commits

View File

@ -6,6 +6,8 @@ import "testing"
import "reflect"
import tu "git.tebibyte.media/sashakoshka/hopp/internal/testutil"
type userDefinedInteger int16
func TestEncodeAnyInt(test *testing.T) {
err := testEncodeAny(test, uint8(0xCA), LI.WithCN(0), tu.S(0xCA))
if err != nil { test.Fatal(err) }
@ -23,7 +25,8 @@ func TestEncodeAnyTable(test *testing.T) {
0xFFFF: []uint16 { 0xBEE5, 0x7777 },
0x1234: [][]uint16 { []uint16 { 0x5 }, []uint16 { 0x17, 0xAAAA} },
0x2345: [][]int16 { []int16 { 0x5 }, []int16 { 0x17, -0xAAA } },
}, KTV.WithCN(0), tu.S(6).AddVar(
0x3456: userDefinedInteger(0x3921),
}, KTV.WithCN(0), tu.S(7).AddVar(
[]byte {
0xF3, 0xB9,
byte(LSI.WithCN(3)),
@ -62,6 +65,11 @@ func TestEncodeAnyTable(test *testing.T) {
0, 0x17,
0xF5, 0x56,
},
[]byte {
0x34, 0x56,
byte(LSI.WithCN(1)),
0x39, 0x21,
},
))
if err != nil { test.Fatal(err) }
}