internal/pipewire: move test data to files

These get very big later on, and would be painful to represent as the compound literal.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-11-25 08:09:10 +09:00
parent 88d3e46413
commit e77652bf89
8 changed files with 29 additions and 433 deletions

View File

@@ -8,14 +8,7 @@ import (
func TestCoreHello(t *testing.T) {
encodingTestCases[pipewire.CoreHello, *pipewire.CoreHello]{
{"sample", []byte{
0x10, 0, 0, 0,
0xe, 0, 0, 0,
4, 0, 0, 0,
4, 0, 0, 0,
4, 0, 0, 0,
0, 0, 0, 0,
}, pipewire.CoreHello{
{"sample", []byte(sendmsg00Message00POD), pipewire.CoreHello{
Version: pipewire.PW_VERSION_CORE,
}, nil},
}.run(t)