add more error case tests to osc.message.decode

This commit is contained in:
Joel Wetzell
2026-03-02 21:04:18 -06:00
parent 8f769f0a4a
commit 5cb2f845a1

View File

@@ -86,10 +86,20 @@ func TestBadOSCMessageDecode(t *testing.T) {
errorString string
}{
{
name: "non byte slice message input",
name: "non []byte payload",
payload: "test",
errorString: "osc.message.decode processor only accepts a []byte payload",
},
{
name: "empty []byte payload",
payload: []byte{},
errorString: "osc.message.decode processor can't work on empty []byte",
},
{
name: "wrong start byte in payload",
payload: []byte{48, 116, 101, 115, 116, 0, 0, 0, 44, 105, 0, 0, 0, 0, 0, 42},
errorString: "osc.message.decode processor needs an OSC looking []byte",
},
}
for _, test := range tests {