diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-26 19:02:21 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-26 19:02:21 +0900 |
| commit | 2698ca00e8fad5f7243c1e1b4c078d322854917c (patch) | |
| tree | d9d46ca19010fcec16c4e41bc2418184bd54ba6b /internal/pipewire/core_test.go | |
| parent | 1d0143386de410b19a0e4adea497f7e246e89226 (diff) | |
internal/pipewire: implement Core::Done
The message in the sample does not correspond to any known method call. The spec does not mention what to do with messages like this, but all existing usage code simply drops it.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/core_test.go')
| -rw-r--r-- | internal/pipewire/core_test.go | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/internal/pipewire/core_test.go b/internal/pipewire/core_test.go index 1dc63278..7d3fad35 100644 --- a/internal/pipewire/core_test.go +++ b/internal/pipewire/core_test.go @@ -12,7 +12,12 @@ func TestFooterCoreGeneration(t *testing.T) { encodingTestCases[pipewire.Footer[pipewire.FooterCoreGeneration], *pipewire.Footer[pipewire.FooterCoreGeneration]]{ {"sample", []byte(recvmsg00Message00Footer), pipewire.Footer[pipewire.FooterCoreGeneration]{ Opcode: pipewire.FOOTER_CORE_OPCODE_GENERATION, - Payload: pipewire.FooterCoreGeneration{RegistryGeneration: 34}, + Payload: pipewire.FooterCoreGeneration{RegistryGeneration: 0x22}, + }, nil}, + + {"sample*", []byte(recvmsg00Message05Footer), pipewire.Footer[pipewire.FooterCoreGeneration]{ + Opcode: pipewire.FOOTER_CORE_OPCODE_GENERATION, + Payload: pipewire.FooterCoreGeneration{RegistryGeneration: 0x23}, }, nil}, }.run(t) } @@ -65,6 +70,17 @@ func TestCoreInfo(t *testing.T) { }.run(t) } +func TestCoreDone(t *testing.T) { + t.Parallel() + + encodingTestCases[pipewire.CoreDone, *pipewire.CoreDone]{ + {"sample", []byte(recvmsg00Message05POD), pipewire.CoreDone{ + ID: -1, + Sequence: 0, + }, nil}, + }.run(t) +} + func TestCoreBoundProps(t *testing.T) { t.Parallel() |
