From d35de7afc07e4e654a3f201169885d0c8a2a9887 Mon Sep 17 00:00:00 2001 From: marauder2k7 Date: Sat, 30 May 2026 21:08:39 +0100 Subject: [PATCH] TORQUE_TESTS_ENABLED check no longer required --- Engine/source/CMakeLists.txt | 4 ++-- Engine/source/gfx/D3D11/gfxD3D11Device.cpp | 4 ---- Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp | 4 ---- Engine/source/testing/strTest.cpp | 3 --- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Engine/source/CMakeLists.txt b/Engine/source/CMakeLists.txt index c97342485..440cd9d2d 100644 --- a/Engine/source/CMakeLists.txt +++ b/Engine/source/CMakeLists.txt @@ -645,6 +645,8 @@ if(TORQUE_TESTING) list(APPEND TORQUE_TEST_SOURCES ${TORQUE_TEST_FILES}) list(FILTER TORQUE_TEST_SOURCES EXCLUDE REGEX "main/main\\.cpp$") + list(FILTER TORQUE_TEST_SOURCES EXCLUDE REGEX "gfx/D3D11/") + list(FILTER TORQUE_TEST_SOURCES EXCLUDE REGEX "gfx/gl/") add_executable(${TORQUE_APP_NAME}_unittests ${TORQUE_TEST_SOURCES} @@ -667,8 +669,6 @@ if(TORQUE_TESTING) target_compile_definitions(${TORQUE_APP_NAME}_unittests PUBLIC ${TORQUE_COMPILE_DEFINITIONS} - TORQUE_TESTS_ENABLED - "_VARIADIC_MAX=10" TORQUE_SHARED SDL_MAIN_HANDLED ) diff --git a/Engine/source/gfx/D3D11/gfxD3D11Device.cpp b/Engine/source/gfx/D3D11/gfxD3D11Device.cpp index 6e937bc34..291b4cb05 100644 --- a/Engine/source/gfx/D3D11/gfxD3D11Device.cpp +++ b/Engine/source/gfx/D3D11/gfxD3D11Device.cpp @@ -258,10 +258,6 @@ DXGI_SWAP_CHAIN_DESC GFXD3D11Device::setupPresentParams(const GFXVideoMode &mode void GFXD3D11Device::enumerateAdapters(Vector &adapterList) { -#ifdef TORQUE_TESTS_ENABLED - return; -#endif - IDXGIAdapter1* EnumAdapter; IDXGIFactory1* DXGIFactory; diff --git a/Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp b/Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp index a81c0334c..401cf9558 100644 --- a/Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp +++ b/Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp @@ -77,10 +77,6 @@ void EnumerateVideoModes(Vector& outModes) void GFXGLDevice::enumerateAdapters( Vector &adapterList ) { -#ifdef TORQUE_TESTS_ENABLED - return; -#endif - AssertFatal( SDL_WasInit(SDL_INIT_VIDEO), ""); PlatformGL::init(); // for hints about context creation diff --git a/Engine/source/testing/strTest.cpp b/Engine/source/testing/strTest.cpp index 94ebdfe30..9cfbcfd38 100644 --- a/Engine/source/testing/strTest.cpp +++ b/Engine/source/testing/strTest.cpp @@ -20,7 +20,6 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#ifdef TORQUE_TESTS_ENABLED #include "testing/unitTesting.h" #include "core/util/str.h" #include "core/util/tVector.h" @@ -347,5 +346,3 @@ TEST(StringBuilder, StringBuilder) EXPECT_TRUE( str.end() == String( "foobarbarfoo" ) ); } - -#endif