Changed test to match CUDA output of errors

We changed the test so that it runs on CUDA. As we are emulating CUDA behavior, this should pass on HIP.
Bu işleme şunda yer alıyor:
Aditya Avinash Atluri
2016-03-03 13:48:58 -06:00
ebeveyn 20f939b356
işleme d4765d39a2
+3 -3
Dosyayı Görüntüle
@@ -164,7 +164,7 @@ void testSimple()
hipFree(A_d);
e = hipPointerGetAttributes(&attribs, A_d);
HIPASSERT(e == hipErrorInvalidValue); // Just freed the pointer, this should return an error.
HIPASSERT(e == hipErrorUnknown); // Just freed the pointer, this should return an error.
// Device-visible host memory
@@ -180,7 +180,7 @@ void testSimple()
hipFreeHost(A_Pinned_h);
e = hipPointerGetAttributes(&attribs, A_Pinned_h);
HIPASSERT(e == hipErrorInvalidValue); // Just freed the pointer, this should return an error.
HIPASSERT(e == hipErrorUnknown); // Just freed the pointer, this should return an error.
printf("getAttr:%-20s err=%d (%s), neg-test expected\n", "A_d+NBytes", e, hipGetErrorString(e));
@@ -188,7 +188,7 @@ void testSimple()
printf ("\nOS-allocated memory (malloc)\n");
e = hipPointerGetAttributes(&attribs, A_OSAlloc_h);
printf("getAttr:%-20s err=%d (%s), neg-test expected\n", "A_OSAlloc_h", e, hipGetErrorString(e));
HIPASSERT(e == hipErrorInvalidValue); // OS-allocated pointers should return hipErrorInvalidValue.
HIPASSERT(e == hipErrorUnknown); // OS-allocated pointers should return hipErrorUnknown.
}
//---