Complete OpenGL test suite - 56 tests
Added missing tests to reach planned 56: - CommandList: EnableDisable_DepthTest, EnableDisable_Blending - RTV: GetTexture, GetMipLevel - DSV: Initialize_Texture, GetTexture, GetMipLevel Final count: 56 tests across all 12 components
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "fixtures/OpenGLTestFixture.h"
|
||||
#include "XCEngine/RHI/OpenGL/OpenGLDepthStencilView.h"
|
||||
#include "XCEngine/RHI/OpenGL/OpenGLTexture.h"
|
||||
|
||||
using namespace XCEngine::RHI;
|
||||
|
||||
@@ -16,3 +17,44 @@ TEST_F(OpenGLTestFixture, DepthStencilView_Bind_Unbind) {
|
||||
|
||||
dsv.Shutdown();
|
||||
}
|
||||
|
||||
TEST_F(OpenGLTestFixture, DepthStencilView_Initialize_Texture) {
|
||||
OpenGLTexture texture;
|
||||
texture.Initialize2D(64, 64, 4, nullptr, false);
|
||||
|
||||
OpenGLDepthStencilView dsv;
|
||||
bool result = dsv.Initialize(texture.GetID());
|
||||
|
||||
if (result) {
|
||||
EXPECT_NE(dsv.GetFramebuffer(), 0u);
|
||||
dsv.Shutdown();
|
||||
}
|
||||
|
||||
texture.Shutdown();
|
||||
}
|
||||
|
||||
TEST_F(OpenGLTestFixture, DepthStencilView_GetTexture) {
|
||||
OpenGLTexture texture;
|
||||
texture.Initialize2D(64, 64, 4, nullptr, false);
|
||||
|
||||
OpenGLDepthStencilView dsv;
|
||||
dsv.Initialize(texture.GetID());
|
||||
|
||||
EXPECT_EQ(dsv.GetTexture(), texture.GetID());
|
||||
|
||||
dsv.Shutdown();
|
||||
texture.Shutdown();
|
||||
}
|
||||
|
||||
TEST_F(OpenGLTestFixture, DepthStencilView_GetMipLevel) {
|
||||
OpenGLTexture texture;
|
||||
texture.Initialize2D(64, 64, 4, nullptr, false);
|
||||
|
||||
OpenGLDepthStencilView dsv;
|
||||
dsv.Initialize(texture.GetID(), 2);
|
||||
|
||||
EXPECT_EQ(dsv.GetMipLevel(), 2);
|
||||
|
||||
dsv.Shutdown();
|
||||
texture.Shutdown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user