From 33531e337aa1db72005d20a131ba9a8f2ce821cc Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 21 Nov 2023 10:29:35 +0100 Subject: Allow not being able to get the minimum latency in test_callback_ret.cpp and test_logging.cpp, as it's not essential for the test --- test/test_callback_ret.cpp | 5 ++++- test/test_logging.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test_callback_ret.cpp b/test/test_callback_ret.cpp index a9d9a40..0737b60 100644 --- a/test/test_callback_ret.cpp +++ b/test/test_callback_ret.cpp @@ -181,7 +181,10 @@ run_test_callback(test_direction direction, cubeb_data_callback data_cb, output_params = input_params; r = cubeb_get_min_latency(ctx, &input_params, &latency_frames); - ASSERT_EQ(r, CUBEB_OK) << "Could not get minimal latency"; + if (r != CUBEB_OK) { + // not fatal + latency_frames = 1024; + } switch (direction) { case INPUT_ONLY: diff --git a/test/test_logging.cpp b/test/test_logging.cpp index fef8e20..54ff718 100644 --- a/test/test_logging.cpp +++ b/test/test_logging.cpp @@ -106,7 +106,10 @@ TEST(cubeb, logging) output_params.prefs = CUBEB_STREAM_PREF_NONE; r = cubeb_get_min_latency(ctx, &output_params, &latency_frames); - ASSERT_EQ(r, CUBEB_OK) << "Could not get minimal latency"; + if (r != CUBEB_OK) { + // not fatal + latency_frames = 1024; + } r = cubeb_stream_init(ctx, &stream, "Cubeb logging", NULL, NULL, NULL, &output_params, latency_frames, data_cb_load, state_cb, -- cgit v1.2.3