Files
XCEngine/tests/RHI/unit/fixtures/RHITestFixture.h
ssdfasd 7a66913f2b refactor(RHI): 将窗口职责从RHI移到Platform层
- RHIDeviceDesc 删除 windowHandle/width/height/appName
- SwapChainDesc 添加 windowHandle 字段
- RHISwapChain 删除 PollEvents/ShouldClose/SetFullscreen 等窗口相关接口
- OpenGLDevice 删除 CreateRenderWindow,改用 InitializeWithExistingWindow
- 更新所有集成测试使用新API
- 273个单元测试 + 8个集成测试全部通过
2026-03-24 23:00:49 +08:00

42 lines
1.0 KiB
C++

#pragma once
#include <gtest/gtest.h>
#include <string>
#include <windows.h>
#include "XCEngine/RHI/RHIFactory.h"
#include "XCEngine/RHI/RHIDevice.h"
#include "XCEngine/RHI/RHICommandQueue.h"
#include "XCEngine/RHI/RHICommandList.h"
#include "XCEngine/RHI/RHIBuffer.h"
#include "XCEngine/RHI/RHITexture.h"
#include "XCEngine/RHI/RHISwapChain.h"
#include "XCEngine/RHI/RHIShader.h"
#include "XCEngine/RHI/RHIFence.h"
#include "XCEngine/RHI/RHISampler.h"
#include "XCEngine/RHI/RHIDescriptorPool.h"
#include "XCEngine/RHI/RHIPipelineLayout.h"
namespace XCEngine {
namespace RHI {
class RHITestFixture : public ::testing::TestWithParam<RHIType> {
protected:
void SetUp() override;
void TearDown() override;
static void SetUpTestSuite();
static void TearDownTestSuite();
RHIDevice* GetDevice() { return mDevice; }
RHIType GetBackendType() const { return GetParam(); }
HWND GetWindowHandle() const { return mWindow; }
private:
RHIDevice* mDevice = nullptr;
HWND mWindow = nullptr;
};
} // namespace RHI
} // namespace XCEngine