test: extend testing suite to include skeleton, raycast and animation_player #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds extensive unit test coverage for the rendering and W3D file parsing systems, including new test suites for skeleton pose computation, animation playback, bounding box operations, and raycasting. Additionally, three new W3D parser tests are integrated into the existing test suite.
Key Changes
New Test Executables
SkeletonPoseclass covering rest pose computation, bone hierarchies, transformations, and animated poses (372 tests)BoundingBoxclass covering expansion, center/size/radius calculations, and validity checks (318 tests)AnimationPlayerclass covering animation loading, playback control, frame management, and different playback modes (446 tests)W3D Parser Tests
test_hierarchy_parser.cppto w3d_teststest_animation_parser.cppto w3d_teststest_hlod_parser.cppto w3d_testsTest Coverage Details
SkeletonPose Tests (372 tests):
AnimationPlayer Tests (446 tests):
BoundingBox Tests (318 tests):
Build Configuration
https://claude.ai/code/session_01XcgaUwfTYoWjA5M8tDpdmm
Greptile Overview
Greptile Summary
This PR adds comprehensive unit test coverage for the rendering and W3D file parsing systems, totaling over 1,100 new tests across 8 files.
Render Module Tests:
test_skeleton_pose.cpp: 372 tests covering rest pose computation, bone hierarchies, transformations, and animated poses with proper edge case handlingtest_animation_player.cpp: 446 tests for animation loading, playback control (Loop/Once/PingPong modes), and frame managementtest_bounding_box.cpp: 318 tests for AABB operations including expansion, center/size/radius calculations, and validity checksraycast_test.cpp: Tests for ray-triangle, ray-sphere, and ray-line segment intersections using Möller-Trumbore algorithmW3D Parser Tests:
test_hierarchy_parser.cpp: Tests for skeleton/bone parsing including pivot transformations, quaternion rotations, and fixupstest_animation_parser.cpp: Tests for both standard and compressed animation parsing with channels and bit channelstest_hlod_parser.cpp: Tests for hierarchical LOD parsing including multiple LOD levels, aggregates, proxies, and bounding boxesBuild Integration:
All new test executables are properly configured in CMakeLists.txt with consistent compiler flags (
-Wall -Wextra -Wpedantic -Werrorfor GCC/Clang,/W4 /permissive-for MSVC) and registered with CTest for CI integration. The tests only depend on gtest, gtest_main, and glm::glm (no Vulkan dependencies), making them fast and portable.Confidence Score: 5/5
Important Files Changed