Files
artnet-go/pollreply_test.go
T
Joel Wetzell 16f045e8fe add poll reply
2026-05-30 07:21:24 -05:00

31 lines
611 B
Go

package artnet_test
import (
"reflect"
"testing"
"github.com/jwetzell/artnet-go"
)
func TestGoodArtPollReplyUnmarshal(t *testing.T) {
tests := []struct {
Name string
Data []byte
Expected *artnet.ArtPollReply
}{}
for _, test := range tests {
t.Run(test.Name, func(t *testing.T) {
got := &artnet.ArtPollReply{}
err := got.UnmarshalBinary(test.Data)
if err != nil {
t.Fatalf("failed to Unmarshal ArtPollReply: %s", err)
}
if !reflect.DeepEqual(got, test.Expected) {
t.Fatalf("ArtPollReply does not match got: %+v expected: %+v", got, test.Expected)
}
})
}
}