From 83f912b58af2d39265184aa5ca4c30050757fe9e Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Fri, 22 Jan 2021 11:34:45 -0800 Subject: UnitTests: Add setup error checking Check return value of calls to File::CreateTempDir() from CoreTiming, FileSystem, and MMIO test classes to verify the test user directory exists, and fail the tests otherwise. --- Source/UnitTests/Core/MMIOTest.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/UnitTests/Core/MMIOTest.cpp') diff --git a/Source/UnitTests/Core/MMIOTest.cpp b/Source/UnitTests/Core/MMIOTest.cpp index 04bf850a96..56433476b5 100644 --- a/Source/UnitTests/Core/MMIOTest.cpp +++ b/Source/UnitTests/Core/MMIOTest.cpp @@ -34,6 +34,7 @@ TEST(UniqueID, UniqueEnough) TEST(IsMMIOAddress, SpecialAddresses) { const std::string profile_path = File::CreateTempDir(); + ASSERT_FALSE(profile_path.empty()); UICommon::SetUserDirectory(profile_path); Config::Init(); SConfig::Init(); -- cgit v1.2.3