add error handling to arg encoding and message/bundle ToBytes()

This commit is contained in:
Joel Wetzell
2026-04-13 18:38:25 -05:00
parent 1130adf046
commit 4744321d71
9 changed files with 169 additions and 62 deletions
+7 -3
View File
@@ -128,10 +128,14 @@ func TestGoodOSCMessageEncoding(t *testing.T) {
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
actual := testCase.message.ToBytes()
got, err := testCase.message.ToBytes()
if !reflect.DeepEqual(actual, testCase.expected) {
t.Fatalf("failed to encode properly got '%v', expected '%v'", actual, testCase.expected)
if err != nil {
t.Fatalf("failed to encode properly: %s", err.Error())
}
if !reflect.DeepEqual(got, testCase.expected) {
t.Fatalf("failed to encode properly got '%v', expected '%v'", got, testCase.expected)
}
})
}