message-size-increase #3
@ -9,7 +9,7 @@ import tu "git.tebibyte.media/sashakoshka/hopp/internal/testutil"
|
||||
func TestEncodeAnyInt(test *testing.T) {
|
||||
err := testEncodeAny(test, uint8(0xCA), LI.WithCN(0), tu.S(0xCA))
|
||||
if err != nil { test.Fatal(err) }
|
||||
err = testEncodeAny(test, 400, LI.WithCN(3), tu.S(
|
||||
err = testEncodeAny(test, 400, LSI.WithCN(3), tu.S(
|
||||
0, 0, 0x1, 0x90,
|
||||
))
|
||||
if err != nil { test.Fatal(err) }
|
||||
@ -22,15 +22,16 @@ func TestEncodeAnyTable(test *testing.T) {
|
||||
0x0000: "hi!",
|
||||
0xFFFF: []uint16 { 0xBEE5, 0x7777 },
|
||||
0x1234: [][]uint16 { []uint16 { 0x5 }, []uint16 { 0x17, 0xAAAA} },
|
||||
}, KTV.WithCN(0), tu.S(5).AddVar(
|
||||
0x2345: [][]int16 { []int16 { 0x5 }, []int16 { 0x17, -0xAAA } },
|
||||
}, KTV.WithCN(0), tu.S(6).AddVar(
|
||||
[]byte {
|
||||
0xF3, 0xB9,
|
||||
byte(LI.WithCN(3)),
|
||||
byte(LSI.WithCN(3)),
|
||||
0, 0, 0, 1,
|
||||
},
|
||||
[]byte {
|
||||
0x01, 0x02,
|
||||
byte(LI.WithCN(3)),
|
||||
byte(LSI.WithCN(3)),
|
||||
0, 0, 0, 2,
|
||||
},
|
||||
[]byte {
|
||||
@ -52,6 +53,15 @@ func TestEncodeAnyTable(test *testing.T) {
|
||||
0, 0x17,
|
||||
0xAA, 0xAA,
|
||||
},
|
||||
[]byte {
|
||||
0x23, 0x45,
|
||||
byte(OTA.WithCN(0)), 2, byte(OTA.WithCN(0)),
|
||||
1, byte(LSI.WithCN(1)),
|
||||
0, 0x5,
|
||||
2, byte(LSI.WithCN(1)),
|
||||
0, 0x17,
|
||||
0xF5, 0x56,
|
||||
},
|
||||
))
|
||||
if err != nil { test.Fatal(err) }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user