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
2026-03-24 15:44:13 +08:00
|
|
|
# ============================================================
|
|
|
|
|
# Mesh Tests
|
|
|
|
|
# ============================================================
|
|
|
|
|
|
|
|
|
|
set(MESH_TEST_SOURCES
|
|
|
|
|
test_mesh.cpp
|
|
|
|
|
test_mesh_loader.cpp
|
|
|
|
|
test_mesh_import_settings.cpp
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_executable(mesh_tests ${MESH_TEST_SOURCES})
|
|
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
|
set_target_properties(mesh_tests PROPERTIES
|
|
|
|
|
LINK_FLAGS "/NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcmt.lib"
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
target_link_libraries(mesh_tests
|
|
|
|
|
PRIVATE
|
|
|
|
|
XCEngine
|
|
|
|
|
GTest::gtest
|
|
|
|
|
GTest::gtest_main
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_include_directories(mesh_tests PRIVATE
|
|
|
|
|
${CMAKE_SOURCE_DIR}/engine/include
|
|
|
|
|
${CMAKE_SOURCE_DIR}/tests/fixtures
|
|
|
|
|
)
|
|
|
|
|
|
2026-03-26 02:53:34 +08:00
|
|
|
target_compile_definitions(mesh_tests PRIVATE
|
|
|
|
|
XCENGINE_TEST_FIXTURES_DIR="${CMAKE_SOURCE_DIR}/tests/fixtures"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_custom_command(TARGET mesh_tests POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
|
${CMAKE_SOURCE_DIR}/engine/third_party/assimp/bin/assimp-vc143-mt.dll
|
|
|
|
|
$<TARGET_FILE_DIR:mesh_tests>/assimp-vc143-mt.dll
|
|
|
|
|
)
|
|
|
|
|
|
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
2026-03-24 15:44:13 +08:00
|
|
|
include(GoogleTest)
|
|
|
|
|
gtest_discover_tests(mesh_tests)
|