update free-d-decode

This commit is contained in:
Joel Wetzell
2026-05-23 07:57:34 -05:00
parent 4323a21015
commit 5a2aefbdd5
6 changed files with 19 additions and 11 deletions
@@ -34,12 +34,12 @@ func TestGoodFreeDDecode(t *testing.T) {
tests := []struct {
name string
payload []byte
payload [29]byte
expected any
}{
{
name: "basic freed",
payload: []byte{0xd1, 0x01, 0x5a, 0x00, 0x00, 0x2d, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x7f, 0xff, 0x40, 0x7f, 0xff, 0x80, 0x7f, 0xff,
payload: [29]byte{0xd1, 0x01, 0x5a, 0x00, 0x00, 0x2d, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x7f, 0xff, 0x40, 0x7f, 0xff, 0x80, 0x7f, 0xff,
0xc0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00, 0x00, 50,
},
expected: freeD.FreeDPosition{
@@ -34,12 +34,12 @@ func TestGoodFreeDEncode(t *testing.T) {
tests := []struct {
name string
expected []byte
expected [29]byte
payload any
}{
{
name: "basic freed",
expected: []byte{0xd1, 0x01, 0x5a, 0x00, 0x00, 0x2d, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x7f, 0xff, 0x40, 0x7f, 0xff, 0x80, 0x7f, 0xff,
expected: [29]byte{0xd1, 0x01, 0x5a, 0x00, 0x00, 0x2d, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x7f, 0xff, 0x40, 0x7f, 0xff, 0x80, 0x7f, 0xff,
0xc0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00, 0x00, 50,
},
payload: freeD.FreeDPosition{