]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
tests: add test script for ALSATimer.TickEvent boxed structure
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Sun, 19 Jun 2022 11:43:34 +0000 (20:43 +0900)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
tests/alsatimer-tick-event [new file with mode: 0644]
tests/meson.build

diff --git a/tests/alsatimer-tick-event b/tests/alsatimer-tick-event
new file mode 100644 (file)
index 0000000..4ca7f85
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+
+from sys import exit
+from errno import ENXIO
+
+from helper import test_struct
+
+import gi
+gi.require_version('ALSATimer', '0.0')
+from gi.repository import ALSATimer
+
+target_type = ALSATimer.TickEvent
+methods = (
+    'get_resolution',
+    'get_ticks',
+)
+
+if not test_struct(target_type, methods):
+    exit(ENXIO)
index 01df4d099b3e094db7b65cec045fd9ec3e1d32ae..b825eda3837b26346619be127a02e8ef9861c382 100644 (file)
@@ -25,6 +25,7 @@ tests = {
     'alsatimer-instance-params',
     'alsatimer-instance-status',
     'alsatimer-device-id',
+    'alsatimer-tick-event',
   ],
   'seq': [
     'alsaseq-enums',