diff --git a/src/tests/idmap-api-test/idmap-api-test.c b/src/tests/idmap-api-test/idmap-api-test.c index 917c1614a..9349115f2 100644 --- a/src/tests/idmap-api-test/idmap-api-test.c +++ b/src/tests/idmap-api-test/idmap-api-test.c @@ -203,34 +203,34 @@ void Test_OS_ConvertToArrayIndex(void) * Test with nominal values */ UtAssert_INT32_EQ(OS_ConvertToArrayIndex(task_id, &TestArrayIndex), OS_SUCCESS); - UtAssert_True(TestArrayIndex >= 0 && TestArrayIndex < OS_MAX_TASKS, "0 < TestArrayIndex(%lu) <= OS_MAX_TASKS", + UtAssert_True(TestArrayIndex < OS_MAX_TASKS, "TestArrayIndex(%lu) < OS_MAX_TASKS", (long)TestArrayIndex); UtAssert_INT32_EQ(OS_ConvertToArrayIndex(queue_id, &TestArrayIndex), OS_SUCCESS); - UtAssert_True(TestArrayIndex >= 0 && TestArrayIndex < OS_MAX_QUEUES, "0 < TestArrayIndex(%lu) <= OS_MAX_QUEUES", + UtAssert_True(TestArrayIndex < OS_MAX_QUEUES, "TestArrayIndex(%lu) < OS_MAX_QUEUES", (long)TestArrayIndex); UtAssert_INT32_EQ(OS_ConvertToArrayIndex(count_sem_id, &TestArrayIndex), OS_SUCCESS); - UtAssert_True(TestArrayIndex >= 0 && TestArrayIndex < OS_MAX_COUNT_SEMAPHORES, - "0 < TestArrayIndex(%lu) <= OS_MAX_COUNT_SEMAPHORES", (long)TestArrayIndex); + UtAssert_True(TestArrayIndex < OS_MAX_COUNT_SEMAPHORES, + "TestArrayIndex(%lu) < OS_MAX_COUNT_SEMAPHORES", (long)TestArrayIndex); UtAssert_INT32_EQ(OS_ConvertToArrayIndex(bin_sem_id, &TestArrayIndex), OS_SUCCESS); - UtAssert_True(TestArrayIndex >= 0 && TestArrayIndex < OS_MAX_BIN_SEMAPHORES, - "0 < TestArrayIndex(%lu) <= OS_MAX_BIN_SEMAPHORES", (long)TestArrayIndex); + UtAssert_True(TestArrayIndex < OS_MAX_BIN_SEMAPHORES, + "TestArrayIndex(%lu) < OS_MAX_BIN_SEMAPHORES", (long)TestArrayIndex); UtAssert_INT32_EQ(OS_ConvertToArrayIndex(mutex_id1, &TestMutex1Index), OS_SUCCESS); - UtAssert_True(TestMutex1Index >= 0 && TestMutex1Index < OS_MAX_MUTEXES, - "0 < TestMutex1Index(%lu) <= OS_MAX_MUTEXES", (long)TestMutex1Index); + UtAssert_True(TestMutex1Index < OS_MAX_MUTEXES, + "TestMutex1Index(%lu) < OS_MAX_MUTEXES", (long)TestMutex1Index); UtAssert_INT32_EQ(OS_ConvertToArrayIndex(mutex_id2, &TestMutex2Index), OS_SUCCESS); - UtAssert_True(TestMutex2Index >= 0 && TestMutex2Index < OS_MAX_MUTEXES, - "0 < TestMutex2Index(%lu) <= OS_MAX_MUTEXES", (long)TestMutex2Index); + UtAssert_True(TestMutex2Index < OS_MAX_MUTEXES, + "TestMutex2Index(%lu) < OS_MAX_MUTEXES", (long)TestMutex2Index); UtAssert_True(TestMutex1Index != TestMutex2Index, "TestMutex1Index(%lu) != TestMutex2Index(%lu)", (long)TestMutex1Index, (long)TestMutex2Index); UtAssert_INT32_EQ(OS_ConvertToArrayIndex(time_base_id, &TestArrayIndex), OS_SUCCESS); - UtAssert_True(TestArrayIndex >= 0 && TestArrayIndex < OS_MAX_TIMEBASES, - "0 < TestArrayIndex(%lu) <= OS_MAX_TIMEBASES", (long)TestArrayIndex); + UtAssert_True(TestArrayIndex < OS_MAX_TIMEBASES, + "TestArrayIndex(%lu) < OS_MAX_TIMEBASES", (long)TestArrayIndex); /* * Test with extreme cases using invalid inputs and checking diff --git a/src/tests/time-base-api-test/time-base-api-test.c b/src/tests/time-base-api-test/time-base-api-test.c index fb6eae488..f149aba82 100644 --- a/src/tests/time-base-api-test/time-base-api-test.c +++ b/src/tests/time-base-api-test/time-base-api-test.c @@ -201,8 +201,6 @@ void TestTimeBaseApi(void) (unsigned long)timebase_prop.nominal_interval_time); UtAssert_True(timebase_prop.freerun_time == 0, "timebase_prop.freerun_time (%lu) == 0", (unsigned long)timebase_prop.freerun_time); - UtAssert_True(timebase_prop.accuracy >= 0, "timebase_prop.accuracy (%lu) >= 0", - (unsigned long)timebase_prop.accuracy); /* Test for invalid inputs */ UtAssert_INT32_EQ(OS_TimeBaseGetInfo(OS_OBJECT_ID_UNDEFINED, &timebase_prop), OS_ERR_INVALID_ID);