diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-12-14 09:20:58 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-12-14 09:20:58 +0900 |
| commit | b0f2ab6fffd48580d758de80165f8d97438b4066 (patch) | |
| tree | e58678218b33bc2e4fccc1582214b70d0f1bd8b6 /internal/pipewire/core_test.go | |
| parent | 00a5bdf006ba800e0797ff4c2b732e5df4fa28ff (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/core_test.go')
| -rw-r--r-- | internal/pipewire/core_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
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() |
