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

Change-Id: I6c05915c957d9b67951b3e97cc35cb1ca72a945f
Ta zmiana jest zawarta w:
Mirza Halilcevic authored and Rakesh Roy committed 2024-02-23 20:45:53 +05:30
1 rodzic cf5ebc5990
złożenie 044a59496c
31 plików zmienionych
+674 -463

Żadne pliki nie pasują do Twojego wyszukiwania

+13
Wyświetl plik
@@ -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__); \