Skip to content

Commit

Permalink
Merge pull request #583 from skliper/fix581-timer-tsf
Browse files Browse the repository at this point in the history
Fix #581, Use OS_MAX_TIMEBASES for max timer create unit test
  • Loading branch information
astrogeco authored Sep 2, 2020
2 parents 6720437 + 9f37d05 commit b5b9801
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/unit-tests/ostimer-test/ut_ostimer_timerio_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void UT_os_timerinit_test()
** (a) OS_ERR_NAME_TAKEN
** -----------------------------------------------------
** Test #5: No-free-ids condition
** 1) Call this routine N number of times, where N = OS_MAX_TIMERS+1
** 1) Call this routine N number of times, where N = OS_MAX_TIMEBASES+1
** 2) Expect the returned value of the last call to be
** (a) OS_ERR_NO_FREE_IDS
** -----------------------------------------------------
Expand Down Expand Up @@ -295,7 +295,7 @@ void UT_os_timercreate_test()
/*-----------------------------------------------------*/
testDesc = "#5 No-free-IDs";

for (i=0; i <= OS_MAX_TIMERS; i++)
for (i=0; i <= OS_MAX_TIMEBASES; i++)
{
memset(tmpStr, '\0', sizeof(tmpStr));
UT_os_sprintf(tmpStr, "Timer #%d", (int)i);
Expand All @@ -304,7 +304,7 @@ void UT_os_timercreate_test()
break;
}

if (i < OS_MAX_TIMERS)
if (i < OS_MAX_TIMEBASES)
{
testDesc = "#4 No-free-IDs - Timer-created failed";
UT_OS_TEST_RESULT( testDesc, UTASSERT_CASETYPE_TSF);
Expand Down

0 comments on commit b5b9801

Please sign in to comment.