cleanup: remove unused test scenes and update minimal RHI integration
This commit is contained in:
@@ -39,6 +39,9 @@ add_custom_command(TARGET OpenGL_Minimal POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm
|
||||
$<TARGET_FILE_DIR:OpenGL_Minimal>/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${ENGINE_ROOT_DIR}/third_party/renderdoc/renderdoc.dll
|
||||
$<TARGET_FILE_DIR:OpenGL_Minimal>/
|
||||
)
|
||||
|
||||
add_test(NAME OpenGL_Minimal_Integration
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "XCEngine/RHI/RHIFactory.h"
|
||||
#include "XCEngine/RHI/D3D12/D3D12Device.h"
|
||||
|
||||
using namespace XCEngine::RHI;
|
||||
|
||||
TEST(RHIFactory, CreateD3D12Device_ReturnsValidPointer) {
|
||||
RHIDevice* device = RHIFactory::CreateRHIDevice(RHIType::D3D12);
|
||||
|
||||
ASSERT_NE(device, nullptr);
|
||||
|
||||
delete device;
|
||||
}
|
||||
|
||||
TEST(RHIFactory, CreateD3D12DeviceByName_ReturnsValidPointer) {
|
||||
RHIDevice* device = RHIFactory::CreateRHIDevice("D3D12");
|
||||
|
||||
ASSERT_NE(device, nullptr);
|
||||
|
||||
delete device;
|
||||
}
|
||||
|
||||
TEST(RHIFactory, CreateInvalidDevice_ReturnsNullptr) {
|
||||
RHIDevice* device = RHIFactory::CreateRHIDevice("InvalidAPI");
|
||||
|
||||
ASSERT_EQ(device, nullptr);
|
||||
}
|
||||
|
||||
TEST(RHIFactory, CreateInvalidType_ReturnsNullptr) {
|
||||
RHIDevice* device = RHIFactory::CreateRHIDevice(RHIType::Vulkan);
|
||||
|
||||
ASSERT_EQ(device, nullptr);
|
||||
}
|
||||
|
||||
TEST(D3D12DeviceCreation, DirectCreation_Success) {
|
||||
D3D12Device* device = new D3D12Device();
|
||||
|
||||
ASSERT_NE(device, nullptr);
|
||||
|
||||
delete device;
|
||||
}
|
||||
Reference in New Issue
Block a user