tests: remove legacy test tree

This commit is contained in:
2026-04-22 00:22:32 +08:00
parent 8bfca5e8f2
commit bc47e6e5ac
754 changed files with 0 additions and 3517894 deletions

View File

@@ -1,23 +0,0 @@
find_package(GTest REQUIRED)
add_executable(debug_tests
test_logger.cpp
test_profiler.cpp
test_renderdoc_capture.cpp
)
target_link_libraries(debug_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
)
add_custom_command(TARGET debug_tests POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/engine/third_party/renderdoc/renderdoc.dll
$<TARGET_FILE_DIR:debug_tests>/
)
include(GoogleTest)
gtest_discover_tests(debug_tests)

View File

@@ -1,48 +0,0 @@
#include <gtest/gtest.h>
#include <XCEngine/Debug/Logger.h>
#include <XCEngine/Debug/ConsoleLogSink.h>
using namespace XCEngine::Debug;
namespace {
TEST(Debug_Logger, LogLevel) {
EXPECT_STREQ(LogLevelToString(LogLevel::Verbose), "VERBOSE");
EXPECT_STREQ(LogLevelToString(LogLevel::Debug), "DEBUG");
EXPECT_STREQ(LogLevelToString(LogLevel::Info), "INFO");
EXPECT_STREQ(LogLevelToString(LogLevel::Warning), "WARNING");
EXPECT_STREQ(LogLevelToString(LogLevel::Error), "ERROR");
EXPECT_STREQ(LogLevelToString(LogLevel::Fatal), "FATAL");
}
TEST(Debug_Logger, LogCategory) {
EXPECT_STREQ(LogCategoryToString(LogCategory::General), "General");
EXPECT_STREQ(LogCategoryToString(LogCategory::Rendering), "Rendering");
EXPECT_STREQ(LogCategoryToString(LogCategory::Memory), "Memory");
EXPECT_STREQ(LogCategoryToString(LogCategory::Threading), "Threading");
}
TEST(Debug_Logger, Initialize) {
Logger& logger = Logger::Get();
logger.Initialize();
EXPECT_TRUE(true);
logger.Shutdown();
}
TEST(Debug_Logger, SetMinimumLevel) {
Logger& logger = Logger::Get();
logger.Initialize();
logger.SetMinimumLevel(LogLevel::Warning);
EXPECT_TRUE(true);
logger.Shutdown();
}
TEST(Debug_Logger, SetCategoryEnabled) {
Logger& logger = Logger::Get();
logger.Initialize();
logger.SetCategoryEnabled(LogCategory::Rendering, false);
EXPECT_TRUE(true);
logger.Shutdown();
}
} // namespace

View File

@@ -1,37 +0,0 @@
#include <gtest/gtest.h>
#include <XCEngine/Debug/Profiler.h>
using namespace XCEngine::Debug;
namespace {
TEST(Debug_Profiler, Initialize) {
Profiler& profiler = Profiler::Get();
profiler.Initialize();
EXPECT_TRUE(true);
profiler.Shutdown();
}
TEST(Debug_Profiler, BeginEndProfile) {
Profiler& profiler = Profiler::Get();
profiler.Initialize();
profiler.BeginProfile("TestProfile");
profiler.EndProfile();
EXPECT_TRUE(true);
profiler.Shutdown();
}
TEST(Debug_Profiler, Frame) {
Profiler& profiler = Profiler::Get();
profiler.Initialize();
profiler.BeginFrame();
profiler.EndFrame();
EXPECT_TRUE(true);
profiler.Shutdown();
}
} // namespace

View File

@@ -1,51 +0,0 @@
#include <gtest/gtest.h>
#include "XCEngine/Debug/RenderDocCapture.h"
using namespace XCEngine::Debug;
TEST(RenderDocCaptureTest, Initialize) {
auto* rc = &RenderDocCapture::Get();
bool result = rc->Initialize(nullptr, nullptr);
EXPECT_TRUE(result) << "RenderDoc initialization failed - check if renderdoc.dll is available";
EXPECT_TRUE(rc->IsLoaded());
}
TEST(RenderDocCaptureTest, Shutdown) {
auto* rc = &RenderDocCapture::Get();
rc->Initialize(nullptr, nullptr);
ASSERT_TRUE(rc->IsLoaded()) << "RenderDoc not loaded";
rc->Shutdown();
}
TEST(RenderDocCaptureTest, BeginEndCapture) {
auto* rc = &RenderDocCapture::Get();
rc->Initialize(nullptr, nullptr);
ASSERT_TRUE(rc->IsLoaded()) << "RenderDoc not loaded";
rc->BeginCapture("UnitTestCapture");
rc->EndCapture();
}
TEST(RenderDocCaptureTest, TriggerCapture) {
auto* rc = &RenderDocCapture::Get();
rc->Initialize(nullptr, nullptr);
ASSERT_TRUE(rc->IsLoaded()) << "RenderDoc not loaded";
rc->TriggerCapture();
}
TEST(RenderDocCaptureTest, SetCaptureFilePath) {
auto* rc = &RenderDocCapture::Get();
rc->Initialize(nullptr, nullptr);
ASSERT_TRUE(rc->IsLoaded()) << "RenderDoc not loaded";
rc->SetCaptureFilePath(".\\test_captures");
}
TEST(RenderDocCaptureTest, SetCaptureComments) {
auto* rc = &RenderDocCapture::Get();
rc->Initialize(nullptr, nullptr);
ASSERT_TRUE(rc->IsLoaded()) << "RenderDoc not loaded";
rc->SetCaptureComments("Unit test capture");
}