aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pipewire/core_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-12-10 01:25:30 +0900
committerOphestra <cat@gensokyo.uk>2025-12-10 01:25:30 +0900
commit0e2fb1788f48540fd7a860b8c571e3a8c1cae756 (patch)
treecb93b12a512c77c8f423e159f2b9a50730d2a509 /internal/pipewire/core_test.go
parentd8417e292762eebbbe7203aa98eb34eb5c34434e (diff)
internal/pipewire: implement Registry::Destroy
This requires error handling infrastructure in Core that does not yet exist, so it is not exported for now. It has been manually tested via linkname against PipeWire. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/core_test.go')
-rw-r--r--internal/pipewire/core_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/pipewire/core_test.go b/internal/pipewire/core_test.go
index 42b18b98..f9e5f09d 100644
--- a/internal/pipewire/core_test.go
+++ b/internal/pipewire/core_test.go
@@ -774,3 +774,20 @@ func TestRegistryBind(t *testing.T) {
}, nil},
}.run(t)
}
+
+func TestRegistryDestroy(t *testing.T) {
+ t.Parallel()
+
+ encodingTestCases[pipewire.RegistryDestroy, *pipewire.RegistryDestroy]{
+ {"sample", []byte{
+ /* size: rest of data*/ 0x10, 0, 0, 0,
+ /* type: Struct */ 0xe, 0, 0, 0,
+ /* size: 4 bytes */ 4, 0, 0, 0,
+ /* type: Int */ 4, 0, 0, 0,
+ /* value: 0xbad */ 0xad, 0xb, 0, 0,
+ /* padding */ 0, 0, 0, 0,
+ }, pipewire.RegistryDestroy{
+ ID: 0xbad,
+ }, nil},
+ }.run(t)
+}