2026-03-17 23:38:29 +08:00
|
|
|
#include <gtest/gtest.h>
|
refactor(tests): update Resources include paths to new directory structure
- Updated 23 test files in tests/Resources/ to use new include paths:
- Core/Asset: IResource, ResourceTypes, ResourceHandle, ResourceManager, ResourceCache, AsyncLoader, ResourceDependencyGraph
- Core/IO: IResourceLoader, ResourceFileSystem, ResourcePackage, ResourcePath, FileArchive
- Resources subdirs: Texture/*, Shader/*, Mesh/*, Material/*, AudioClip/*
2026-03-24 15:02:59 +08:00
|
|
|
#include <XCEngine/Resources/Mesh/Mesh.h>
|
|
|
|
|
#include <XCEngine/Core/Asset/ResourceTypes.h>
|
|
|
|
|
#include <XCEngine/Core/Asset/ResourceManager.h>
|
2026-03-17 23:38:29 +08:00
|
|
|
|
|
|
|
|
using namespace XCEngine::Resources;
|
|
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
|
|
TEST(Mesh, DefaultConstructor) {
|
|
|
|
|
Mesh mesh;
|
|
|
|
|
EXPECT_EQ(mesh.GetVertexCount(), 0u);
|
|
|
|
|
EXPECT_EQ(mesh.GetIndexCount(), 0u);
|
|
|
|
|
EXPECT_EQ(mesh.GetVertexStride(), 0u);
|
|
|
|
|
EXPECT_FALSE(mesh.IsUse32BitIndex());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(Mesh, GetType) {
|
|
|
|
|
Mesh mesh;
|
|
|
|
|
EXPECT_EQ(mesh.GetType(), ResourceType::Mesh);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(Mesh, GetMemorySize) {
|
|
|
|
|
Mesh mesh;
|
|
|
|
|
EXPECT_EQ(mesh.GetMemorySize(), 0u);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(Mesh, GetSections) {
|
|
|
|
|
Mesh mesh;
|
|
|
|
|
EXPECT_EQ(mesh.GetSections().Size(), 0u);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace
|