From: Takashi Sakamoto Date: Wed, 27 Nov 2019 06:11:18 +0000 (+0900) Subject: hwdep: add a test script for enumerations in ALSAHwdep namespace X-Git-Tag: v0.1.0~205 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=5762f21b3d2cd0623d4f0f7f6ce2ef95964d574f;p=alsa-gobject.git hwdep: add a test script for enumerations in ALSAHwdep namespace Signed-off-by: Takashi Sakamoto --- diff --git a/tests/alsahwdep-enums b/tests/alsahwdep-enums new file mode 100644 index 0000000..d6b0747 --- /dev/null +++ b/tests/alsahwdep-enums @@ -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) diff --git a/tests/meson.build b/tests/meson.build index f209bf5..74d2c82 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -45,6 +45,9 @@ tests = { 'alsaseq-queue-timer', 'alsaseq-queue-timer-alsa', ], + 'hwdep': [ + 'alsahwdep-enums', + ], } foreach path, scripts: tests