From 189bb29f76b50100e28be4752499bf2a156233c6 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Sun, 14 Apr 2024 20:22:38 +0200 Subject: [PATCH] tests/periph/timer: also test for idx out of range Also test that `timer_query_freqs()` for an index out of range does return 0, as stated by the doc. --- tests/periph/timer/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/periph/timer/main.c b/tests/periph/timer/main.c index 132677dc90..0071119a28 100644 --- a/tests/periph/timer/main.c +++ b/tests/periph/timer/main.c @@ -249,6 +249,8 @@ static void print_supported_frequencies(tim_t dev) " %u: %" PRIu32 "\n", (unsigned)(end - 1), timer_query_freqs(dev, end - 1)); } + + expect(timer_query_freqs(dev, end) == 0); } int main(void)