From ce1566b9c2a7bcab968f54f90424b75109b29075 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Sun, 19 Jun 2022 20:38:51 +0900 Subject: [PATCH] tests: add test script for ALSATimer.TickEvent boxed structure Signed-off-by: Takashi Sakamoto --- tests/alsatimer-tick-event | 19 +++++++++++++++++++ tests/meson.build | 1 + 2 files changed, 20 insertions(+) create mode 100644 tests/alsatimer-tick-event diff --git a/tests/alsatimer-tick-event b/tests/alsatimer-tick-event new file mode 100644 index 0000000..4ca7f85 --- /dev/null +++ b/tests/alsatimer-tick-event @@ -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) diff --git a/tests/meson.build b/tests/meson.build index 01df4d0..b825eda 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -25,6 +25,7 @@ tests = { 'alsatimer-instance-params', 'alsatimer-instance-status', 'alsatimer-device-id', + 'alsatimer-tick-event', ], 'seq': [ 'alsaseq-enums', -- 2.47.3