refactor(tests): reorganize tests directory to match engine structure
- Created tests/Core/Asset/ with tests for IResource, ResourceTypes, ResourceHandle, ResourceCache, ResourceDependencyGraph, ResourceGUID - Created tests/Core/IO/ with tests for IResourceLoader, ResourcePath, ResourceFileSystem, FileArchive, ResourcePackage - Reorganized tests/Resources/ into subdirectories: Texture/, Mesh/, Material/, Shader/, AudioClip/ - Added CMakeLists.txt for each new test subdirectory - Fixed Material.h missing ResourceManager.h include (lost during engine refactor) - tests/Core/CMakeLists.txt updated to include Asset/ and IO/ subdirectories
This commit is contained in:
33
tests/Resources/Mesh/test_mesh.cpp
Normal file
33
tests/Resources/Mesh/test_mesh.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <XCEngine/Resources/Mesh/Mesh.h>
|
||||
#include <XCEngine/Core/Asset/ResourceTypes.h>
|
||||
#include <XCEngine/Core/Asset/ResourceManager.h>
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user