diff --git a/Source/UnitTests/CMakeLists.txt b/Source/UnitTests/CMakeLists.txt index 18bae340a7..649c802830 100644 --- a/Source/UnitTests/CMakeLists.txt +++ b/Source/UnitTests/CMakeLists.txt @@ -16,7 +16,7 @@ macro(add_dolphin_test target) $ ) set_target_properties(${target} PROPERTIES FOLDER Tests) - target_link_libraries(${target} core gtest_main) + target_link_libraries(${target} core uicommon gtest_main) add_dependencies(unittests ${target}) add_test(NAME ${target} COMMAND ${target}) endmacro() diff --git a/Source/UnitTests/Core/CoreTimingTest.cpp b/Source/UnitTests/Core/CoreTimingTest.cpp index f4cac5a6b6..6f35bfff3c 100644 --- a/Source/UnitTests/Core/CoreTimingTest.cpp +++ b/Source/UnitTests/Core/CoreTimingTest.cpp @@ -12,6 +12,7 @@ #include "Core/Core.h" #include "Core/CoreTiming.h" #include "Core/PowerPC/PowerPC.h" +#include "UICommon/UICommon.h" // Numbers are chosen randomly to make sure the correct one is given. static constexpr std::array CB_IDS{{42, 144, 93, 1026, UINT64_C(0xFFFF7FFFF7FFFF)}}; @@ -37,6 +38,7 @@ public: ScopeInit() { Core::DeclareAsCPUThread(); + UICommon::SetUserDirectory(""); Config::Init(); SConfig::Init(); PowerPC::Init(PowerPC::CORE_INTERPRETER); diff --git a/Source/UnitTests/Core/MMIOTest.cpp b/Source/UnitTests/Core/MMIOTest.cpp index f6b8cfad1e..f1a414045a 100644 --- a/Source/UnitTests/Core/MMIOTest.cpp +++ b/Source/UnitTests/Core/MMIOTest.cpp @@ -8,6 +8,7 @@ #include "Common/CommonTypes.h" #include "Core/Config/Config.h" #include "Core/HW/MMIO.h" +#include "UICommon/UICommon.h" // Tests that the UniqueID function returns a "unique enough" identifier // number: that is, it is unique in the address ranges we care about. @@ -30,6 +31,7 @@ TEST(UniqueID, UniqueEnough) TEST(IsMMIOAddress, SpecialAddresses) { + UICommon::SetUserDirectory(""); Config::Init(); SConfig::Init(); SConfig::GetInstance().bWii = true; diff --git a/Source/UnitTests/UnitTests.vcxproj b/Source/UnitTests/UnitTests.vcxproj index ac927cea75..6f527c3bda 100644 --- a/Source/UnitTests/UnitTests.vcxproj +++ b/Source/UnitTests/UnitTests.vcxproj @@ -81,6 +81,9 @@ {29F29A19-F141-45AD-9679-5A2923B49DA3} + + {604c8368-f34a-4d55-82c8-cc92a0c13254} +