diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2022-06-17 17:37:39 +0900 |
---|---|---|
committer | 坂本 貴史 <o-takashi@sakamocchi.jp> | 2022-06-19 18:56:37 +0900 |
commit | 1f4c85b35f52b9f6e8fed59ec1f0808f0fc5d6e6 (patch) | |
tree | 3563a1f1401a6d5bb68feb52246bce3355303829 | |
parent | 1c7461db167fadf465c112e6feaac3f66875c908 (diff) | |
download | libhinoko-1f4c85b35f52b9f6e8fed59ec1f0808f0fc5d6e6.tar.gz |
tests: add test script for Hinoko.FwIsoResource interface
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | tests/fw-iso-resource | 35 | ||||
-rw-r--r-- | tests/meson.build | 1 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/fw-iso-resource b/tests/fw-iso-resource new file mode 100644 index 0000000..3b412d5 --- /dev/null +++ b/tests/fw-iso-resource @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 + +from sys import exit +from errno import ENXIO + +from helper import test_object + +import gi +gi.require_version('Hinoko', '0.0') +from gi.repository import Hinoko + +target_type = Hinoko.FwIsoResource +props = ( + 'generation', +) +methods = ( + 'open', + 'create_source', + 'allocate_async', + 'allocate_sync', +) +vmethods = ( + 'do_open', + 'do_allocate_async', + 'do_create_source', + 'do_allocated', + 'do_deallocated', +) +signals = ( + 'allocated', + 'deallocated', +) + +if not test_object(target_type, props, methods, vmethods, signals): + exit(ENXIO) diff --git a/tests/meson.build b/tests/meson.build index c34a595..43bab5f 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -4,6 +4,7 @@ tests = [ 'fw-iso-rx-single', 'fw-iso-rx-multiple', 'fw-iso-tx', + 'fw-iso-resource', 'fw-iso-resource-auto', 'fw-iso-resource-once', 'cycle-timer', |