From 3c4959f943398cc23a81350d4dacdc4139c5aef0 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Sun, 19 Jun 2022 20:38:51 +0900 Subject: [PATCH] tests: add test script for ALSATimer.DeviceId boxed structure Signed-off-by: Takashi Sakamoto --- tests/alsatimer-device-id | 18 +++++++----------- tests/meson.build | 1 + 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/alsatimer-device-id b/tests/alsatimer-device-id index 009c4da..fa068ad 100644 --- a/tests/alsatimer-device-id +++ b/tests/alsatimer-device-id @@ -3,24 +3,20 @@ from sys import exit from errno import ENXIO -from helper import test_object +from helper import test_struct import gi gi.require_version('ALSATimer', '0.0') from gi.repository import ALSATimer -target = ALSATimer.DeviceId() -props = ( - 'class', - 'slave-class', - 'card-id', - 'device-id', - 'subdevice-id', -) +target_type = ALSATimer.DeviceId methods = ( 'new', + 'get_class', + 'get_card_id', + 'get_device_id', + 'get_subdevice_id', ) -signals = () -if not test_object(target, props, methods, signals): +if not test_struct(target_type, methods): exit(ENXIO) diff --git a/tests/meson.build b/tests/meson.build index e6d931a..01df4d0 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -24,6 +24,7 @@ tests = { 'alsatimer-instance-info', 'alsatimer-instance-params', 'alsatimer-instance-status', + 'alsatimer-device-id', ], 'seq': [ 'alsaseq-enums', -- 2.47.3