]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
hwdep: add a test script for enumerations in ALSAHwdep namespace
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 27 Nov 2019 06:11:18 +0000 (15:11 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Wed, 8 Apr 2020 01:40:25 +0000 (10:40 +0900)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
tests/alsahwdep-enums [new file with mode: 0644]
tests/meson.build

diff --git a/tests/alsahwdep-enums b/tests/alsahwdep-enums
new file mode 100644 (file)
index 0000000..d6b0747
--- /dev/null
@@ -0,0 +1,46 @@
+#!/usr/bin/env python3
+
+from sys import exit
+import gi
+gi.require_version('ALSAHwdep', '0.0')
+from gi.repository import ALSAHwdep
+
+iface_types = (
+    'OPL2',
+    'OPL3',
+    'OPL4',
+    'SB16CSP',
+    'EMU10K1',
+    'YSS225',
+    'ICS2115',
+    'SSCAPE',
+    'VX',
+    'MIXART',
+    'USX2Y',
+    'EMUX_WAVETABLE',
+    'BLUETOOTH',
+    'USX2Y_PCM',
+    'PCXHR',
+    'SB_RC',
+    'HDA',
+    'USB_STREAM',
+    'FW_DICE',
+    'FW_FIREWORKS',
+    'FW_BEBOB',
+    'FW_OXFW',
+    'FW_DIGI00X',
+    'FW_TASCAM',
+    'LINE6',
+    'FW_MOTU',
+    'FW_FIREFACE',
+)
+
+types = {
+    ALSAHwdep.IfaceType:    iface_types,
+}
+
+for obj, types in types.items():
+    for t in types:
+        if not hasattr(obj, t):
+            print('Enumerator {0} is not produced.'.format(t))
+            exit(1)
index f209bf5011149912f8a3392fbd14eb481216a3e5..74d2c825f75dcbe6ada631502d19fbc81b93f417 100644 (file)
@@ -45,6 +45,9 @@ tests = {
     'alsaseq-queue-timer',
     'alsaseq-queue-timer-alsa',
   ],
+  'hwdep': [
+    'alsahwdep-enums',
+  ],
 }
 
 foreach path, scripts: tests