diff options
Diffstat (limited to 'internal/pipewire/spa_test.go')
| -rw-r--r-- | internal/pipewire/spa_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/pipewire/spa_test.go b/internal/pipewire/spa_test.go index 6bf7794b..0a7d79aa 100644 --- a/internal/pipewire/spa_test.go +++ b/internal/pipewire/spa_test.go @@ -3,10 +3,32 @@ package pipewire_test import ( _ "embed" "encoding/binary" + "testing" "hakurei.app/internal/pipewire" ) +func TestSPAKind(t *testing.T) { + t.Parallel() + + testCases := []struct { + name string + v pipewire.SPAKind + want string + }{ + {"invalid", 0xdeadbeef, "invalid type field 0xdeadbeef"}, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + if got := tc.v.String(); got != tc.want { + t.Errorf("String: %q, want %q", got, tc.want) + } + }) + } +} + // splitMessages splits concatenated messages into groups of // header, payload, footer of each individual message. // splitMessages panics on any decoding error. |
