diff --git a/projects/hip-tests/catch/unit/rtc/includepath.cc b/projects/hip-tests/catch/unit/rtc/includepath.cc index a72a8824f0..94e609b196 100644 --- a/projects/hip-tests/catch/unit/rtc/includepath.cc +++ b/projects/hip-tests/catch/unit/rtc/includepath.cc @@ -22,7 +22,7 @@ TEST_CASE("Unit_hiprtc_includepath") { string saxpy = ""; { - fstream f("saxpy.h"); + fstream f("saxpy.h" , std::ios::in); if (f.is_open()) { size_t sizeFile; f.seekg(0, fstream::end); @@ -32,6 +32,9 @@ TEST_CASE("Unit_hiprtc_includepath") { f.read(&saxpy[0], size); f.close(); } + else { + FAIL("Failed to open saxpy.h. Please ensure the file exists and is accessible."); + } } hiprtcProgram prog;