From b0f2ab6fffd48580d758de80165f8d97438b4066 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 14 Dec 2025 09:20:58 +0900 Subject: internal/pipewire: implement Core::Destroy This change also implements pending destructible check on Sync. Destruction method should always be implemented as a wrapper of destructible.destroy. Signed-off-by: Ophestra --- internal/pipewire/core_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'internal/pipewire/core_test.go') diff --git a/internal/pipewire/core_test.go b/internal/pipewire/core_test.go index 39fbcd67..4840aa65 100644 --- a/internal/pipewire/core_test.go +++ b/internal/pipewire/core_test.go @@ -365,6 +365,24 @@ func TestCoreCreateObject(t *testing.T) { }.run(t) } +func TestCoreDestroy(t *testing.T) { + t.Parallel() + + encodingTestCases[pipewire.CoreDestroy, *pipewire.CoreDestroy]{ + {"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.CoreDestroy{ + ID: 3, + }, nil}, + }.run(t) +} + func TestRegistryGlobal(t *testing.T) { t.Parallel() -- cgit v1.3.1