add test for bundle with bad contents

This commit is contained in:
Joel Wetzell
2026-04-13 22:41:43 -05:00
parent 1465663a63
commit eb539dd319
+13 -1
View File
@@ -51,7 +51,19 @@ func TestBadOSCBundleEncoding(t *testing.T) {
name string name string
bundle *OSCBundle bundle *OSCBundle
errorString string errorString string
}{} }{
{
name: "bundle contains message with bad address",
bundle: &OSCBundle{
TimeTag: OSCTimeTag{
seconds: 32,
fractionalSeconds: 0,
},
Contents: []OSCPacket{&OSCMessage{Address: "hello", Args: []OSCArg{}}},
},
errorString: "OSC Message address must start with /",
},
}
for _, testCase := range testCases { for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) { t.Run(testCase.name, func(t *testing.T) {