EXSWHTEC-281 - Implement Unit Tests for assert functions #210

Change-Id: I6c05915c957d9b67951b3e97cc35cb1ca72a945f


[ROCm/hip-tests commit: 044a59496c]
이 커밋은 다음에 포함됨:
Mirza Halilcevic 작성하고 Rakesh Roy가 2024-02-23 20:45:53 +05:30를 커밋함
1 부모 1cd4e6a55b
커밋 dcade635c6
31 파일이 변경됨
+674 -463

검색과 일치하는 파일 없음

+13
파일 보기
@@ -129,6 +129,19 @@ THE SOFTWARE.
} \
}
// Check that an expression, errorExpr, evaluates to the expected error_t, expectedError.
#define HIPRTC_CHECK_ERROR(errorExpr, expectedError) \
{ \
auto localError = errorExpr; \
INFO("Matching Errors: " \
<< "\n Expected Error: " << hiprtcGetErrorString(expectedError) \
<< "\n Expected Code: " << expectedError << '\n' \
<< " Actual Error: " << hiprtcGetErrorString(localError) \
<< "\n Actual Code: " << localError << "\nStr: " << #errorExpr \
<< "\n In File: " << __FILE__ << "\n At line: " << __LINE__); \
REQUIRE(localError == expectedError); \
}
#define HIPASSERT(condition) \
if (!(condition)) { \
printf("assertion %s at %s:%d \n", #condition, __FILE__, __LINE__); \