]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
tests: add test script for ALSACtl.ElemInfoCommon interface
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
tests/alsactl-elem-info-boolean
tests/alsactl-elem-info-bytes
tests/alsactl-elem-info-common [new file with mode: 0644]
tests/alsactl-elem-info-enumerated
tests/alsactl-elem-info-iec60958
tests/alsactl-elem-info-integer
tests/alsactl-elem-info-integer64
tests/meson.build

index 8aaba937d7795348ba05fd34bef8a318a678a86a..d97b379ddfc156c4347e1dc91c61b2b83a780bcd 100644 (file)
@@ -11,6 +11,7 @@ from gi.repository import ALSACtl
 
 target_type = ALSACtl.ElemInfoBoolean
 props = (
+    # From interfaces.
     'elem-id',
     'elem-type',
     'access',
index 0af5bbbae3df964819ce7aa632a486db090c0ae2..e97427632f8e68f5a1f41ec617fed9f7b09f8b1b 100644 (file)
@@ -11,6 +11,7 @@ from gi.repository import ALSACtl
 
 target_type = ALSACtl.ElemInfoBytes
 props = (
+    # From interfaces.
     'elem-id',
     'elem-type',
     'access',
diff --git a/tests/alsactl-elem-info-common b/tests/alsactl-elem-info-common
new file mode 100644 (file)
index 0000000..cb10976
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+
+from sys import exit
+from errno import ENXIO
+
+from helper import test_object
+
+import gi
+gi.require_version('ALSACtl', '0.0')
+from gi.repository import ALSACtl
+
+target_type = ALSACtl.ElemInfoCommon
+props = (
+    'elem-id',
+    'elem-type',
+    'access',
+    'owner',
+)
+methods = ()
+vmethods = ()
+signals = ()
+
+if not test_object(target_type, props, methods, vmethods, signals):
+    exit(ENXIO)
index 050aa7f054bad26d6355abbd10afba87f55aac4f..4deb468441a6bee607039aaa275f1c2aeffe36c6 100644 (file)
@@ -11,12 +11,13 @@ from gi.repository import ALSACtl
 
 target_type = ALSACtl.ElemInfoEnumerated
 props = (
+    'labels',
+    # From interfaces.
     'elem-id',
     'elem-type',
     'access',
     'owner',
     'value-count',
-    'labels',
 )
 methods = (
     'new',
index a774ab45ce2d02071da8c8b81ed3c9fcef6cc940..b40bf203cc9ffcfbcf2d3f25b0417a0990c53aea 100644 (file)
@@ -11,6 +11,7 @@ from gi.repository import ALSACtl
 
 target_type = ALSACtl.ElemInfoIec60958
 props = (
+    # From interfaces.
     'elem-id',
     'elem-type',
     'access',
index ad41810be16c6e8639fcb8551d857350ccc7b17b..d84426bbd75aa7cf28e1ceec8ac24471cf64b4fa 100644 (file)
@@ -11,14 +11,15 @@ from gi.repository import ALSACtl
 
 target_type = ALSACtl.ElemInfoInteger
 props = (
+    'value-min',
+    'value-max',
+    'value-step',
+    # From interfaces.
     'elem-id',
     'elem-type',
     'access',
     'owner',
     'value-count',
-    'value-min',
-    'value-max',
-    'value-step',
 )
 methods = (
     'new',
index 129e93758298aea0e3f1f5a1976c808f6b951abd..f0546dae20eb644e12fa98ee59b65b7f3f04d341 100644 (file)
@@ -11,14 +11,15 @@ from gi.repository import ALSACtl
 
 target_type = ALSACtl.ElemInfoInteger64
 props = (
+    'value-min',
+    'value-max',
+    'value-step',
+    # From interfaces.
     'elem-id',
     'elem-type',
     'access',
     'owner',
     'value-count',
-    'value-min',
-    'value-max',
-    'value-step',
 )
 methods = (
     'new',
index a21618cdd89dca37e9915bcf487fd6629c3bd48b..50d34fb9099bd5b210f6bd1a8da5439e855e6472 100644 (file)
@@ -14,6 +14,7 @@ tests = {
     'alsactl-elem-info-enumerated',
     'alsactl-elem-value',
     'alsactl-elem-id',
+    'alsactl-elem-info-common',
   ],
   'timer': [
     'alsatimer-enums',