]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
tests: add test script for ALSASeq.EventDataNote 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/alsaseq-event-data-note [new file with mode: 0644]
tests/meson.build

diff --git a/tests/alsaseq-event-data-note b/tests/alsaseq-event-data-note
new file mode 100644 (file)
index 0000000..7a0d172
--- /dev/null
@@ -0,0 +1,27 @@
+#!/usr/bin/env python3
+
+from sys import exit
+from errno import ENXIO
+
+from helper import test_struct
+
+import gi
+gi.require_version('ALSASeq', '0.0')
+from gi.repository import ALSASeq
+
+target_type = ALSASeq.EventDataNote
+methods = (
+    'get_channel',
+    'set_channel',
+    'get_note',
+    'set_note',
+    'get_velocity',
+    'set_velocity',
+    'get_off_velocity',
+    'set_off_velocity',
+    'get_duration',
+    'set_duration',
+)
+
+if not test_struct(target_type, methods):
+    exit(ENXIO)
index 7592dabcb0f02bfe18894226c6c942c028899912..c5eed84625ce590cd44bc3a2593bf2fae9bb0ea6 100644 (file)
@@ -45,6 +45,7 @@ tests = {
     'alsaseq-event',
     'alsaseq-event-data-connect',
     'alsaseq-event-data-ctl',
+    'alsaseq-event-data-note',
   ],
   'hwdep': [
     'alsahwdep-enums',