tests: drivers: counter: nrf_rtc: Fail if no devices

Test was passing if there were no RTCs enabled given the false positive.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2024-04-12 07:43:54 +02:00 committed by Carles Cufí
commit 0cc08cde62

View file

@ -55,6 +55,7 @@ static void counter_tear_down_instance(const struct device *dev)
static void test_all_instances(counter_test_func_t func)
{
zassert_true(ARRAY_SIZE(devices) > 0);
for (int i = 0; i < ARRAY_SIZE(devices); i++) {
counter_setup_instance(devices[i]);
func(i);