UnitTests: Declare as CPU thread when using CPUThreadConfigCallback

This fixes a bunch of DEBUG_ASSERTs in the unit tests.
This commit is contained in:
JosJuice
2023-08-16 23:28:33 +02:00
parent 2b17e89336
commit 1104b93ee4
7 changed files with 38 additions and 0 deletions

View File

@ -6,6 +6,8 @@
#include "Common/Arm64Emitter.h"
#include "Common/BitUtils.h"
#include "Common/CommonTypes.h"
#include "Common/ScopeGuard.h"
#include "Core/Core.h"
#include "Core/PowerPC/Interpreter/Interpreter_FPUtils.h"
#include "Core/PowerPC/JitArm64/Jit.h"
#include "Core/PowerPC/PowerPC.h"
@ -51,6 +53,9 @@ public:
TEST(JitArm64, Fres)
{
Core::DeclareAsCPUThread();
Common::ScopeGuard cpu_thread_guard([] { Core::UndeclareAsCPUThread(); });
TestFres test(Core::System::GetInstance());
for (const u64 ivalue : double_test_values)