diff options
author | Paul Adenot <[email protected]> | 2023-04-25 14:42:06 +0200 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2023-04-26 14:28:46 +0200 |
commit | 2e0fe891062b6437ad26a75dd010d0b0247561f0 (patch) | |
tree | 5555cd37bc410408717920bcb24f07282c775426 /test/test_devices.cpp | |
parent | 9517d4e837a6bc9f50c35bd7df57153fc002e5e0 (diff) | |
download | cubeb-2e0fe891062b6437ad26a75dd010d0b0247561f0.tar.gz cubeb-2e0fe891062b6437ad26a75dd010d0b0247561f0.zip |
Prevent running test that make use of audio input streams on backends that don't implement it
Diffstat (limited to 'test/test_devices.cpp')
-rw-r--r-- | test/test_devices.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test_devices.cpp b/test/test_devices.cpp index e9b34b3..76e9615 100644 --- a/test/test_devices.cpp +++ b/test/test_devices.cpp @@ -185,6 +185,9 @@ TEST(cubeb, enumerate_devices) count_before_creating_duplex_stream = collection.count; cubeb_device_collection_destroy(ctx, &collection); + if (!can_run_audio_input_test(ctx)) { + return; + } cubeb_stream * stream; cubeb_stream_params input_params; cubeb_stream_params output_params; @@ -221,6 +224,10 @@ TEST(cubeb, stream_get_current_device) fprintf(stdout, "Getting current devices for backend %s\n", cubeb_get_backend_id(ctx)); + if (!can_run_audio_input_test(ctx)) { + return; + } + cubeb_stream * stream = NULL; cubeb_stream_params input_params; cubeb_stream_params output_params; @@ -252,4 +259,4 @@ TEST(cubeb, stream_get_current_device) r = cubeb_stream_device_destroy(stream, device); ASSERT_EQ(r, CUBEB_OK) << "Error destroying current devices"; -}
\ No newline at end of file +} |