Files
XCEngine/tests/RHI/OpenGL/unit/test_device.cpp

25 lines
695 B
C++
Raw Normal View History

#include "fixtures/OpenGLTestFixture.h"
#include "XCEngine/RHI/OpenGL/OpenGLDevice.h"
using namespace XCEngine::RHI;
TEST_F(OpenGLTestFixture, Device_InitializeWithExistingWindow) {
OpenGLDevice device;
HWND existingWindow = GetWindow();
bool result = device.InitializeWithExistingWindow(existingWindow);
ASSERT_TRUE(result);
}
TEST_F(OpenGLTestFixture, Device_GetDeviceInfo_ReturnsValid) {
OpenGLDevice device;
device.InitializeWithExistingWindow(GetWindow());
const auto& info = device.GetDeviceInfo();
EXPECT_FALSE(info.vendor.empty());
EXPECT_FALSE(info.renderer.empty());
EXPECT_GE(info.majorVersion, 3);
EXPECT_GE(info.minorVersion, 0);
}