Implement branching undo system with tests and updates.
- Added branching model for undo/redo, enabling multiple redo paths and branch selection. - Updated `UndoNode` to include `parent` and refined hierarchical navigation. - Extended `UndoSystem` with branching logic for redo operations, supporting sibling branch selection. - Overhauled tests to validate branching behavior and tree invariants. - Refined editor command logic for undo/redo with repeat counts and branch selection. - Enabled test-only introspection hooks for undo tree validation. - Updated CMake to include test definitions (`KTE_TESTS` flag).
This commit is contained in:
@@ -319,6 +319,9 @@ if (BUILD_TESTS)
|
||||
${SYNTAX_SOURCES}
|
||||
)
|
||||
|
||||
# Allow test-only introspection hooks (guarded in headers) without affecting production builds.
|
||||
target_compile_definitions(kte_tests PRIVATE KTE_TESTS=1)
|
||||
|
||||
# Allow tests to include project headers like "Buffer.h"
|
||||
target_include_directories(kte_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user