소스 검색

【utest】fix TC_FAIL_LIST_MARK_FAILED 下标计算错误的问题

guozhanxin 4 년 전
부모
커밋
9e558ab130
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      components/utilities/utest/utest.c

+ 2 - 2
components/utilities/utest/utest.c

@@ -54,8 +54,8 @@ static struct utest local_utest = {UTEST_PASSED, 0, 0};
 #endif
 
 #define TC_FAIL_LIST_SIZE                (RT_ALIGN(tc_num, 8) / 8)
-#define TC_FAIL_LIST_MARK_FAILED(index)  (tc_fail_list[RT_ALIGN(index, 8) / 8] |= (1UL << (index % 8)))
-#define TC_FAIL_LIST_IS_FAILED(index)    (tc_fail_list[RT_ALIGN(index, 8) / 8] &  (1UL << (index % 8)))
+#define TC_FAIL_LIST_MARK_FAILED(index)  (tc_fail_list[index / 8] |= (1UL << (index % 8)))
+#define TC_FAIL_LIST_IS_FAILED(index)    (tc_fail_list[index / 8] &  (1UL << (index % 8)))
 
 void utest_log_lv_set(rt_uint8_t lv)
 {