diff options
| author | Dentomologist <dentomologist@gmail.com> | 2023-08-29 12:07:03 -0700 |
|---|---|---|
| committer | Dentomologist <dentomologist@gmail.com> | 2023-08-29 12:24:11 -0700 |
| commit | 75a62e116c374ff4d9def30e25b7b23e6f836a91 (patch) | |
| tree | 20b455a9d9f5a624bf57b4138835cc9921253319 /Source/UnitTests/Core/PageFaultTest.cpp | |
| parent | 69db8a615fb38318be1a2cbb03a7135eddaad83e (diff) | |
PageFaultTest: Use GTEST_SKIP instead of early return
Using GTEST_SKIP instead of just returning from the function shows that
a test was skipped in the test summary. If GTEST_SKIP is called the rest
of the function won't be run, just like with the return.
GTEST_SKIP wasn't available until gtest 1.10, and we updated to 1.12 in
597f8f1b874bf93854ae178795c55117f680e457.
Diffstat (limited to 'Source/UnitTests/Core/PageFaultTest.cpp')
| -rw-r--r-- | Source/UnitTests/Core/PageFaultTest.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/UnitTests/Core/PageFaultTest.cpp b/Source/UnitTests/Core/PageFaultTest.cpp index 3f693923e0..fd58e1fb45 100644 --- a/Source/UnitTests/Core/PageFaultTest.cpp +++ b/Source/UnitTests/Core/PageFaultTest.cpp @@ -68,10 +68,8 @@ static void ASAN_DISABLE perform_invalid_access(void* data) TEST(PageFault, PageFault) { if (!EMM::IsExceptionHandlerSupported()) - { - // TODO: Use GTEST_SKIP() instead when GTest is updated to 1.10+ - return; - } + GTEST_SKIP() << "Skipping PageFault test because exception handler is unsupported."; + EMM::InstallExceptionHandler(); void* data = Common::AllocateMemoryPages(PAGE_GRAN); EXPECT_NE(data, nullptr); |
