Refactor test structure and enhance object encoding tests

- Updated CMakeLists.txt to correct file paths for unit tests.
- Modified DungeonObjectRenderingE2ETests to inherit from BoundRomTest for better ROM management.
- Enhanced DungeonEditorIntegrationTest with improved mock ROM handling and added graphics data setup.
- Introduced a new MockRom class with methods for setting mock data and initializing memory layout.
- Added comprehensive unit tests for RoomObject encoding and decoding, covering all object types and edge cases.
- Refactored DungeonObjectRenderingTests to utilize BoundRomTest, ensuring consistent ROM loading and setup.
- Improved assertions in rendering tests for better clarity and reliability.
This commit is contained in:
scawful
2025-10-04 13:37:52 -04:00
parent 6990e565b8
commit 20a406892c
12 changed files with 1261 additions and 469 deletions

View File

@@ -42,8 +42,7 @@ if(YAZE_BUILD_TESTS AND NOT YAZE_BUILD_TESTS STREQUAL "OFF")
unit/zelda3/sprite_position_test.cc
unit/zelda3/test_dungeon_objects.cc
unit/zelda3/dungeon_component_unit_test.cc
zelda3/dungeon/room_object_encoding_test.cc
integration/zelda3/room_integration_test.cc
unit/zelda3/dungeon/room_object_encoding_test.cc
zelda3/dungeon/room_manipulation_test.cc
# CLI Services (for catalog serialization tests)
@@ -104,7 +103,7 @@ if(YAZE_BUILD_TESTS AND NOT YAZE_BUILD_TESTS STREQUAL "OFF")
unit/zelda3/sprite_position_test.cc
unit/zelda3/test_dungeon_objects.cc
unit/zelda3/dungeon_component_unit_test.cc
zelda3/dungeon/room_object_encoding_test.cc
unit/zelda3/dungeon/room_object_encoding_test.cc
zelda3/dungeon/room_manipulation_test.cc
# CLI Services (for catalog serialization tests)
@@ -328,8 +327,8 @@ source_group("Tests\\Unit" FILES
unit/zelda3/sprite_position_test.cc
unit/zelda3/test_dungeon_objects.cc
unit/zelda3/dungeon_component_unit_test.cc
zelda3/dungeon/room_object_encoding_test.cc
zelda3/dungeon/room_manipulation_test.cc
unit/zelda3/dungeon/room_object_encoding_test.cc
zelda3/dungeon/room_manipulation_test.cc
unit/zelda3/dungeon_object_renderer_mock_test.cc
unit/zelda3/dungeon_object_rendering_tests.cc
unit/zelda3/dungeon_room_test.cc