tests: remove legacy test tree
This commit is contained in:
@@ -1,77 +0,0 @@
|
||||
#include "fixtures/RHITestFixture.h"
|
||||
#include "XCEngine/RHI/RHISampler.h"
|
||||
|
||||
using namespace XCEngine::RHI;
|
||||
|
||||
TEST_P(RHITestFixture, Sampler_Create) {
|
||||
SamplerDesc desc = {};
|
||||
desc.filter = static_cast<uint32_t>(FilterMode::Linear);
|
||||
desc.addressU = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
desc.addressV = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
desc.addressW = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
desc.mipLodBias = 0.0f;
|
||||
desc.maxAnisotropy = 16;
|
||||
desc.comparisonFunc = static_cast<uint32_t>(ComparisonFunc::Less);
|
||||
desc.borderColorR = 0.0f;
|
||||
desc.borderColorG = 0.0f;
|
||||
desc.borderColorB = 0.0f;
|
||||
desc.borderColorA = 0.0f;
|
||||
desc.minLod = 0.0f;
|
||||
desc.maxLod = 100.0f;
|
||||
|
||||
RHISampler* sampler = GetDevice()->CreateSampler(desc);
|
||||
ASSERT_NE(sampler, nullptr);
|
||||
|
||||
sampler->Shutdown();
|
||||
delete sampler;
|
||||
}
|
||||
|
||||
TEST_P(RHITestFixture, Sampler_Bind_Unbind) {
|
||||
SamplerDesc desc = {};
|
||||
desc.filter = static_cast<uint32_t>(FilterMode::Linear);
|
||||
desc.addressU = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
desc.addressV = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
desc.addressW = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
|
||||
RHISampler* sampler = GetDevice()->CreateSampler(desc);
|
||||
ASSERT_NE(sampler, nullptr);
|
||||
|
||||
sampler->Bind(0);
|
||||
sampler->Unbind(0);
|
||||
|
||||
sampler->Shutdown();
|
||||
delete sampler;
|
||||
}
|
||||
|
||||
TEST_P(RHITestFixture, Sampler_GetID) {
|
||||
SamplerDesc desc = {};
|
||||
desc.filter = static_cast<uint32_t>(FilterMode::Linear);
|
||||
desc.addressU = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
desc.addressV = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
desc.addressW = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
|
||||
RHISampler* sampler = GetDevice()->CreateSampler(desc);
|
||||
ASSERT_NE(sampler, nullptr);
|
||||
|
||||
unsigned int id = sampler->GetID();
|
||||
EXPECT_GE(id, 0u);
|
||||
|
||||
sampler->Shutdown();
|
||||
delete sampler;
|
||||
}
|
||||
|
||||
TEST_P(RHITestFixture, Sampler_GetNativeHandle) {
|
||||
SamplerDesc desc = {};
|
||||
desc.filter = static_cast<uint32_t>(FilterMode::Linear);
|
||||
desc.addressU = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
desc.addressV = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
desc.addressW = static_cast<uint32_t>(TextureAddressMode::Wrap);
|
||||
|
||||
RHISampler* sampler = GetDevice()->CreateSampler(desc);
|
||||
ASSERT_NE(sampler, nullptr);
|
||||
|
||||
EXPECT_NE(sampler->GetNativeHandle(), nullptr);
|
||||
|
||||
sampler->Shutdown();
|
||||
delete sampler;
|
||||
}
|
||||
Reference in New Issue
Block a user