refactor: reorganize unit tests into separate folder

- Move test_*.cpp and fixtures/ to tests/RHI/D3D12/unit/
- Create unit/CMakeLists.txt with proper test configuration
- Simplify parent CMakeLists.txt to use add_subdirectory
- Integration tests remain in integration/ folder
This commit is contained in:
2026-03-20 02:58:33 +08:00
parent 4c6e7af02e
commit fae520854e
16 changed files with 52 additions and 50 deletions

View File

@@ -0,0 +1,20 @@
#include "fixtures/D3D12TestFixture.h"
TEST_F(D3D12TestFixture, Shader_Placeholder) {
ASSERT_NE(GetDevice(), nullptr);
}
TEST_F(D3D12TestFixture, Shader_GetVertexShaderProfile) {
const char* profile = "vs_6_0";
EXPECT_STREQ(profile, "vs_6_0");
}
TEST_F(D3D12TestFixture, Shader_GetPixelShaderProfile) {
const char* profile = "ps_6_0";
EXPECT_STREQ(profile, "ps_6_0");
}
TEST_F(D3D12TestFixture, Shader_GetComputeShaderProfile) {
const char* profile = "cs_6_0";
EXPECT_STREQ(profile, "cs_6_0");
}