From 8f769f0a4a128abf198ad54c59facbbcff7a6472 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Mon, 2 Mar 2026 20:59:29 -0600 Subject: [PATCH] add OSC encode/decode test with arg --- internal/processor/test/osc-message-decode_test.go | 13 +++++++++++++ internal/processor/test/osc-message-encode_test.go | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/internal/processor/test/osc-message-decode_test.go b/internal/processor/test/osc-message-decode_test.go index 4b18c46..702a897 100644 --- a/internal/processor/test/osc-message-decode_test.go +++ b/internal/processor/test/osc-message-decode_test.go @@ -43,6 +43,19 @@ func TestGoodOSCMessageDecode(t *testing.T) { Args: []osc.OSCArg{}, }, }, + { + name: "basic OSC message with argument", + payload: []byte{47, 116, 101, 115, 116, 0, 0, 0, 44, 105, 0, 0, 0, 0, 0, 42}, + expected: osc.OSCMessage{ + Address: "/test", + Args: []osc.OSCArg{ + { + Type: "i", + Value: int32(42), + }, + }, + }, + }, } for _, test := range tests { diff --git a/internal/processor/test/osc-message-encode_test.go b/internal/processor/test/osc-message-encode_test.go index df9b199..33ccf1c 100644 --- a/internal/processor/test/osc-message-encode_test.go +++ b/internal/processor/test/osc-message-encode_test.go @@ -42,6 +42,19 @@ func TestGoodOSCMessageEncode(t *testing.T) { }, expected: []byte{47, 116, 101, 115, 116, 0, 0, 0, 44, 0, 0, 0}, }, + { + name: "basic OSC message with argument", + payload: osc.OSCMessage{ + Address: "/test", + Args: []osc.OSCArg{ + { + Type: "i", + Value: int32(42), + }, + }, + }, + expected: []byte{47, 116, 101, 115, 116, 0, 0, 0, 44, 105, 0, 0, 0, 0, 0, 42}, + }, } for _, test := range tests {