aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pipewire/core_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-12-13 21:49:28 +0900
committerOphestra <cat@gensokyo.uk>2025-12-13 21:50:32 +0900
commitb5999b88140eb437e87580848513dc1e74bc190b (patch)
treeb6c62904f056221b81653f17ae5f90957f5a0d6c /internal/pipewire/core_test.go
parentebc67bb8ada03750eee60ab58c945b4745f22af1 (diff)
internal/pipewire: implement Core::RemoveId
This is emitted by the server when a proxy id is removed for any reason. Currently, the only path for this to be emitted is when a global object is destroyed while some proxy is still bound to it. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/core_test.go')
-rw-r--r--internal/pipewire/core_test.go20
1 files changed, 19 insertions, 1 deletions
diff --git a/internal/pipewire/core_test.go b/internal/pipewire/core_test.go
index f9e5f09d..6d73b5c4 100644
--- a/internal/pipewire/core_test.go
+++ b/internal/pipewire/core_test.go
@@ -171,7 +171,7 @@ func TestCoreError(t *testing.T) {
/* padding */ 0, 0, 0, 0,
/* size: 0x1b bytes */ 0x1b, 0, 0, 0,
- /*type: String*/ 8, 0, 0, 0,
+ /*type: String */ 8, 0, 0, 0,
// value: "no permission to destroy 0\x00"
0x6e, 0x6f, 0x20, 0x70,
@@ -192,6 +192,24 @@ func TestCoreError(t *testing.T) {
}.run(t)
}
+func TestCoreRemoveId(t *testing.T) {
+ t.Parallel()
+
+ encodingTestCases[pipewire.CoreRemoveId, *pipewire.CoreRemoveId]{
+ {"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: 3 */ 3, 0, 0, 0,
+ /* padding */ 0, 0, 0, 0,
+ }, pipewire.CoreRemoveId{
+ ID: 3,
+ }, nil},
+ }.run(t)
+}
+
func TestCoreBoundProps(t *testing.T) {
t.Parallel()