internal/pipewire: implement Core::BoundProps
All checks were successful
Test / Create distribution (push) Successful in 41s
Test / Sandbox (push) Successful in 2m28s
Test / Hakurei (push) Successful in 3m26s
Test / Hpkg (push) Successful in 4m15s
Test / Sandbox (race detector) (push) Successful in 4m25s
Test / Hakurei (race detector) (push) Successful in 5m19s
Test / Flake checks (push) Successful in 1m20s

Very straightforward type, everything is already supported.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-11-25 18:37:50 +09:00
parent 14e33f17e5
commit 77f5b89a41
7 changed files with 62 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ import (
)
func TestFooterCoreGeneration(t *testing.T) {
t.Parallel()
encodingTestCases[pipewire.Footer[pipewire.FooterCoreGeneration], *pipewire.Footer[pipewire.FooterCoreGeneration]]{
{"sample", []byte(recvmsg00Message00Footer), pipewire.Footer[pipewire.FooterCoreGeneration]{
Opcode: pipewire.FOOTER_CORE_OPCODE_GENERATION,
@@ -16,6 +18,8 @@ func TestFooterCoreGeneration(t *testing.T) {
}
func TestCoreInfo(t *testing.T) {
t.Parallel()
encodingTestCases[pipewire.CoreInfo, *pipewire.CoreInfo]{
{"sample", []byte(recvmsg00Message00POD), pipewire.CoreInfo{
ID: 0,
@@ -61,7 +65,28 @@ func TestCoreInfo(t *testing.T) {
}.run(t)
}
func TestCoreBoundProps(t *testing.T) {
t.Parallel()
encodingTestCases[pipewire.CoreBoundProps, *pipewire.CoreBoundProps]{
{"sample", []byte(recvmsg00Message01POD), pipewire.CoreBoundProps{
ID: pipewire.PW_ID_CLIENT,
GlobalID: 34,
Props: &pipewire.SPADict{NItems: 7, Items: []pipewire.SPADictItem{
{Key: "object.serial", Value: "34"},
{Key: "module.id", Value: "2"},
{Key: "pipewire.protocol", Value: "protocol-native"},
{Key: "pipewire.sec.pid", Value: "1443"},
{Key: "pipewire.sec.uid", Value: "1000"},
{Key: "pipewire.sec.gid", Value: "100"},
{Key: "pipewire.sec.socket", Value: "pipewire-0-manager"}},
}}, nil},
}.run(t)
}
func TestCoreHello(t *testing.T) {
t.Parallel()
encodingTestCases[pipewire.CoreHello, *pipewire.CoreHello]{
{"sample", []byte(sendmsg00Message00POD), pipewire.CoreHello{
Version: pipewire.PW_VERSION_CORE,
@@ -70,6 +95,8 @@ func TestCoreHello(t *testing.T) {
}
func TestCoreSync(t *testing.T) {
t.Parallel()
encodingTestCases[pipewire.CoreSync, *pipewire.CoreSync]{
{"sample", []byte(sendmsg00Message03POD), pipewire.CoreSync{
ID: pipewire.PW_ID_CORE,
@@ -79,6 +106,8 @@ func TestCoreSync(t *testing.T) {
}
func TestCoreGetRegistry(t *testing.T) {
t.Parallel()
encodingTestCases[pipewire.CoreGetRegistry, *pipewire.CoreGetRegistry]{
{"sample", []byte(sendmsg00Message02POD), pipewire.CoreGetRegistry{
Version: pipewire.PW_VERSION_REGISTRY,