Skip to content

Commit 9e558ab

Browse files
committed
【utest】fix TC_FAIL_LIST_MARK_FAILED 下标计算错误的问题
1 parent 67762dc commit 9e558ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/utilities/utest/utest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ static struct utest local_utest = {UTEST_PASSED, 0, 0};
5454
#endif
5555

5656
#define TC_FAIL_LIST_SIZE (RT_ALIGN(tc_num, 8) / 8)
57-
#define TC_FAIL_LIST_MARK_FAILED(index) (tc_fail_list[RT_ALIGN(index, 8) / 8] |= (1UL << (index % 8)))
58-
#define TC_FAIL_LIST_IS_FAILED(index) (tc_fail_list[RT_ALIGN(index, 8) / 8] & (1UL << (index % 8)))
57+
#define TC_FAIL_LIST_MARK_FAILED(index) (tc_fail_list[index / 8] |= (1UL << (index % 8)))
58+
#define TC_FAIL_LIST_IS_FAILED(index) (tc_fail_list[index / 8] & (1UL << (index % 8)))
5959

6060
void utest_log_lv_set(rt_uint8_t lv)
6161
{

0 commit comments

Comments
 (0)