Merge pull request #5545 from shuffle2/fix-unittests
unittests: set user directory
This commit is contained in:
commit
c7316c89db
|
@ -16,7 +16,7 @@ macro(add_dolphin_test target)
|
||||||
$<TARGET_OBJECTS:unittests_stubhost>
|
$<TARGET_OBJECTS:unittests_stubhost>
|
||||||
)
|
)
|
||||||
set_target_properties(${target} PROPERTIES FOLDER Tests)
|
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_dependencies(unittests ${target})
|
||||||
add_test(NAME ${target} COMMAND ${target})
|
add_test(NAME ${target} COMMAND ${target})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/CoreTiming.h"
|
#include "Core/CoreTiming.h"
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
|
#include "UICommon/UICommon.h"
|
||||||
|
|
||||||
// Numbers are chosen randomly to make sure the correct one is given.
|
// Numbers are chosen randomly to make sure the correct one is given.
|
||||||
static constexpr std::array<u64, 5> CB_IDS{{42, 144, 93, 1026, UINT64_C(0xFFFF7FFFF7FFFF)}};
|
static constexpr std::array<u64, 5> CB_IDS{{42, 144, 93, 1026, UINT64_C(0xFFFF7FFFF7FFFF)}};
|
||||||
|
@ -37,6 +38,7 @@ public:
|
||||||
ScopeInit()
|
ScopeInit()
|
||||||
{
|
{
|
||||||
Core::DeclareAsCPUThread();
|
Core::DeclareAsCPUThread();
|
||||||
|
UICommon::SetUserDirectory("");
|
||||||
Config::Init();
|
Config::Init();
|
||||||
SConfig::Init();
|
SConfig::Init();
|
||||||
PowerPC::Init(PowerPC::CORE_INTERPRETER);
|
PowerPC::Init(PowerPC::CORE_INTERPRETER);
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Core/Config/Config.h"
|
#include "Core/Config/Config.h"
|
||||||
#include "Core/HW/MMIO.h"
|
#include "Core/HW/MMIO.h"
|
||||||
|
#include "UICommon/UICommon.h"
|
||||||
|
|
||||||
// Tests that the UniqueID function returns a "unique enough" identifier
|
// Tests that the UniqueID function returns a "unique enough" identifier
|
||||||
// number: that is, it is unique in the address ranges we care about.
|
// number: that is, it is unique in the address ranges we care about.
|
||||||
|
@ -30,6 +31,7 @@ TEST(UniqueID, UniqueEnough)
|
||||||
|
|
||||||
TEST(IsMMIOAddress, SpecialAddresses)
|
TEST(IsMMIOAddress, SpecialAddresses)
|
||||||
{
|
{
|
||||||
|
UICommon::SetUserDirectory("");
|
||||||
Config::Init();
|
Config::Init();
|
||||||
SConfig::Init();
|
SConfig::Init();
|
||||||
SConfig::GetInstance().bWii = true;
|
SConfig::GetInstance().bWii = true;
|
||||||
|
|
|
@ -81,6 +81,9 @@
|
||||||
<ProjectReference Include="$(CoreDir)VideoBackends\Vulkan\Vulkan.vcxproj">
|
<ProjectReference Include="$(CoreDir)VideoBackends\Vulkan\Vulkan.vcxproj">
|
||||||
<Project>{29F29A19-F141-45AD-9679-5A2923B49DA3}</Project>
|
<Project>{29F29A19-F141-45AD-9679-5A2923B49DA3}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="$(CoreDir)UICommon\UICommon.vcxproj">
|
||||||
|
<Project>{604c8368-f34a-4d55-82c8-cc92a0c13254}</Project>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
|
Loading…
Reference in New Issue