mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 06:08:50 +00:00
UnitTests: Declare as CPU thread when using CPUThreadConfigCallback
This fixes a bunch of DEBUG_ASSERTs in the unit tests.
This commit is contained in:
parent
2b17e89336
commit
1104b93ee4
7 changed files with 38 additions and 0 deletions
|
@ -5,7 +5,9 @@
|
|||
#include <fmt/format.h>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/ScopeGuard.h"
|
||||
#include "Common/Timer.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/MemTools.h"
|
||||
#include "Core/PowerPC/JitCommon/JitBase.h"
|
||||
#include "Core/PowerPC/JitInterface.h"
|
||||
|
@ -75,6 +77,9 @@ TEST(PageFault, PageFault)
|
|||
EXPECT_NE(data, nullptr);
|
||||
Common::WriteProtectMemory(data, PAGE_GRAN, false);
|
||||
|
||||
Core::DeclareAsCPUThread();
|
||||
Common::ScopeGuard cpu_thread_guard([] { Core::UndeclareAsCPUThread(); });
|
||||
|
||||
auto& system = Core::System::GetInstance();
|
||||
auto unique_pfjit = std::make_unique<PageFaultFakeJit>(system);
|
||||
auto& pfjit = *unique_pfjit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue