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.
This commit is contained in:
Dentomologist
2021-01-22 11:34:45 -08:00
parent caff472dbf
commit 83f912b58a
3 changed files with 32 additions and 0 deletions

View File

@ -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();