From 03b0d2e3aed87a0903047dfc07a7dbd284d860ce Mon Sep 17 00:00:00 2001 From: fp64 <106717720+fp64@users.noreply.github.com> Date: Fri, 10 Mar 2023 09:01:00 -0500 Subject: [PATCH] Add VFS registration during unittest --- unittest/UnitTest.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/unittest/UnitTest.cpp b/unittest/UnitTest.cpp index 1789b97ad0..e8718d6680 100644 --- a/unittest/UnitTest.cpp +++ b/unittest/UnitTest.cpp @@ -58,6 +58,8 @@ #include "Common/CPUDetect.h" #include "Common/Log.h" #include "Core/Config.h" +#include "Common/File/VFS/VFS.h" +#include "Common/File/VFS/DirectoryReader.h" #include "Core/FileSystems/ISOFileSystem.h" #include "Core/MemMap.h" #include "Core/MIPS/MIPSVFPUUtils.h" @@ -352,6 +354,9 @@ bool TestTinySet() { bool TestVFPUSinCos() { float sine, cosine; + // Needed for VFPU tables. + // There might be a better place to invoke it, but whatever. + g_VFS.Register("", new DirectoryReader(Path("assets"))); InitVFPU(); vfpu_sincos(0.0f, sine, cosine); EXPECT_EQ_FLOAT(sine, 0.0f);