From e7c3d0d25d30b16f1802542b2c81c6ffad3beee1 Mon Sep 17 00:00:00 2001 From: ismail Date: Mon, 14 Jul 2025 18:26:29 +0300 Subject: [PATCH] Follow up for 0426552. --- test_apps/main/test_relay_chn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test_apps/main/test_relay_chn.c b/test_apps/main/test_relay_chn.c index 77ed871..9d9eea2 100644 --- a/test_apps/main/test_relay_chn.c +++ b/test_apps/main/test_relay_chn.c @@ -43,8 +43,9 @@ TEST_CASE("Relay channels initialize correctly to FREE state", "[relay_chn]") { // TEST_CASE 1: Test that relays do nothing when an invlid channel id given TEST_CASE("Run forward does nothing if channel id is invalid", "[relay_chn]") { - for (uint8_t i = relay_chn_count*2; i < relay_chn_count; i++) { - relay_chn_run_forward(i); // relay_chn_run_forward returns void + for (uint8_t i = 0; i < relay_chn_count; i++) { + int invalid_id = relay_chn_count * 2 + i; + relay_chn_run_forward(invalid_id); // relay_chn_run_forward returns void // Short delay for state to update vTaskDelay(pdMS_TO_TICKS(test_delay_margin_ms)); TEST_ASSERT_EQUAL(RELAY_CHN_STATE_FREE, relay_chn_get_state(i));