SWDEV-441106 - Fixed Unit_hipEventElapsedTime_NullCheck

Change-Id: Ie796d1b62ab3620104eeb3582cc6c9e52c335f36


[ROCm/hip-tests commit: 381f9d9e99]
This commit is contained in:
Ioannis Assiouras
2024-01-15 16:42:56 +00:00
committad av Maneesh Gupta
förälder 1a525cb854
incheckning 93cdac1e1a
@@ -57,7 +57,10 @@ THE SOFTWARE.
* - HIP_VERSION >= 5.2
*/
TEST_CASE("Unit_hipEventElapsedTime_NullCheck") {
hipEvent_t start = nullptr, end = nullptr;
hipEvent_t start, end;
HIP_CHECK(hipEventCreate(&start));
HIP_CHECK(hipEventCreate(&end));
float tms = 1.0f;
HIP_ASSERT(hipEventElapsedTime(nullptr, start, end) == hipErrorInvalidValue);
#ifndef __HIP_PLATFORM_NVIDIA__
@@ -65,6 +68,8 @@ TEST_CASE("Unit_hipEventElapsedTime_NullCheck") {
HIP_ASSERT(hipEventElapsedTime(&tms, nullptr, end) == hipErrorInvalidHandle);
HIP_ASSERT(hipEventElapsedTime(&tms, start, nullptr) == hipErrorInvalidHandle);
#endif
HIP_CHECK(hipEventDestroy(start));
HIP_CHECK(hipEventDestroy(end));
}
/**