mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-08 18:13:52 +00:00
test(editor): add 4 quest validateChains tests + rename to test_editor_units
Tests cover: - non-existent nextQuestId is flagged - orphan quests (no questgiver, no turn-in) are flagged - turn-in only quest is accepted (auto-completed quest pattern) - circular chain is detected Renamed test_sql_escape → test_editor_units since the file now houses both SQL escape and quest validation tests.
This commit is contained in:
parent
ea713ae994
commit
ad65b2ad36
3 changed files with 115 additions and 53 deletions
|
|
@ -414,25 +414,25 @@ target_link_libraries(test_open_formats PRIVATE catch2_main)
|
|||
add_test(NAME open_formats COMMAND test_open_formats)
|
||||
register_test_target(test_open_formats)
|
||||
|
||||
# ── test_sql_escape ──────────────────────────────────────────
|
||||
add_executable(test_sql_escape
|
||||
test_sql_escape.cpp
|
||||
# ── test_editor_units (SQL escape, quest validation, …) ─────
|
||||
add_executable(test_editor_units
|
||||
test_editor_units.cpp
|
||||
${CMAKE_SOURCE_DIR}/tools/editor/sql_exporter.cpp
|
||||
${CMAKE_SOURCE_DIR}/tools/editor/npc_spawner.cpp
|
||||
${CMAKE_SOURCE_DIR}/tools/editor/quest_editor.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/core/logger.cpp
|
||||
)
|
||||
target_include_directories(test_sql_escape PRIVATE
|
||||
target_include_directories(test_editor_units PRIVATE
|
||||
${TEST_INCLUDE_DIRS}
|
||||
${CMAKE_SOURCE_DIR}/tools/editor
|
||||
)
|
||||
target_include_directories(test_sql_escape SYSTEM PRIVATE
|
||||
target_include_directories(test_editor_units SYSTEM PRIVATE
|
||||
${TEST_SYSTEM_INCLUDE_DIRS}
|
||||
${CMAKE_SOURCE_DIR}/extern/nlohmann
|
||||
)
|
||||
target_link_libraries(test_sql_escape PRIVATE catch2_main)
|
||||
add_test(NAME sql_escape COMMAND test_sql_escape)
|
||||
register_test_target(test_sql_escape)
|
||||
target_link_libraries(test_editor_units PRIVATE catch2_main)
|
||||
add_test(NAME editor_units COMMAND test_editor_units)
|
||||
register_test_target(test_editor_units)
|
||||
|
||||
# ── ASAN / UBSan for test targets ────────────────────────────
|
||||
if(WOWEE_ENABLE_ASAN AND NOT MSVC)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue