Add comprehensive tests for ProcessKernel and Usecode VM functionality
- Implemented tests for ProcessKernel in entity_dispatch_entry_tests.cpp, covering process creation, termination, and scanning of runnable processes. - Enhanced fixed_map_tests.cpp with tests for item allocation and release, including recycling of items and process ownership. - Expanded flex_archive_tests.cpp to validate the interaction between usecode events and item processes, ensuring correct behavior of spawned tasks and rendering. - Introduced usecode_vm_tests.cpp to thoroughly test the UsecodeInterpreterState and UsecodeProcessTask functionalities, including stack operations and opcode services.
This commit is contained in:
parent
e757bb33d0
commit
08a907f322
14 changed files with 1784 additions and 34 deletions
|
|
@ -157,13 +157,21 @@ target_link_libraries(combat_tactics_tests PRIVATE remorse_core)
|
|||
|
||||
add_test(NAME combat_tactics_tests COMMAND combat_tactics_tests)
|
||||
|
||||
add_executable(usecode_vm_tests
|
||||
tests/usecode_vm_tests.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(usecode_vm_tests PRIVATE remorse_core)
|
||||
|
||||
add_test(NAME usecode_vm_tests COMMAND usecode_vm_tests)
|
||||
|
||||
add_library(remorse_test_crash_setup OBJECT tests/test_crash_setup.cpp)
|
||||
target_link_libraries(remorse_test_crash_setup PRIVATE remorse_core)
|
||||
foreach(test_target IN ITEMS
|
||||
entity_dispatch_entry_tests file_system_tests palette_tests flex_archive_tests
|
||||
fixed_map_tests glob_archive_tests type_flags_tests shape_archive_tests
|
||||
map_renderer_tests map_sorter_tests isometric_controls_tests
|
||||
animation_archive_tests collision_tests combat_tactics_tests)
|
||||
animation_archive_tests collision_tests combat_tactics_tests usecode_vm_tests)
|
||||
target_sources(${test_target} PRIVATE $<TARGET_OBJECTS:remorse_test_crash_setup>)
|
||||
endforeach()
|
||||
|
||||
|
|
@ -175,6 +183,7 @@ if(MSVC)
|
|||
target_compile_options(isometric_controls_tests PRIVATE /W4 /permissive-)
|
||||
target_compile_options(animation_archive_tests PRIVATE /W4 /permissive-)
|
||||
target_compile_options(collision_tests PRIVATE /W4 /permissive-)
|
||||
target_compile_options(usecode_vm_tests PRIVATE /W4 /permissive-)
|
||||
target_compile_options(remorse_map_preview PRIVATE /W4 /permissive-)
|
||||
if(WIN32)
|
||||
target_compile_options(remorse_game PRIVATE /W4 /permissive-)
|
||||
|
|
@ -196,6 +205,7 @@ else()
|
|||
target_compile_options(isometric_controls_tests PRIVATE -Wall -Wextra -Wpedantic)
|
||||
target_compile_options(animation_archive_tests PRIVATE -Wall -Wextra -Wpedantic)
|
||||
target_compile_options(collision_tests PRIVATE -Wall -Wextra -Wpedantic)
|
||||
target_compile_options(usecode_vm_tests PRIVATE -Wall -Wextra -Wpedantic)
|
||||
target_compile_options(remorse_map_preview PRIVATE -Wall -Wextra -Wpedantic)
|
||||
if(WIN32)
|
||||
target_compile_options(remorse_game PRIVATE -Wall -Wextra -Wpedantic)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue