|
wxMaxima
|
Regression tests for the worksheet's cell-tree undo/redo (the TreeUndo_* subsystem of Worksheet). More...
#include <wx/app.h>#include <wx/bitmap.h>#include <wx/dcmemory.h>#include <wx/frame.h>#include <wx/log.h>#include "Configuration.h"#include "worksheet/Worksheet.h"#include "cells/GroupCell.h"#include "cells/EditorCell.h"#include <cstdlib>#include <vector>#include <unistd.h>#include <catch2/catch.hpp>Data Structures | |
| class | TestApp |
Functions | |
| SCENARIO ("Adding a cell is undoable and redoable") | |
| SCENARIO ("Deleting a cell is undoable and redoable") | |
| SCENARIO ("Changing a cell's text is undoable") | |
| SCENARIO ("Converting a cell's type via SetCellStyle rebuilds it and is undoable") | |
| SCENARIO ("SetCellStyle refuses to convert an image cell") | |
| SCENARIO ("Folding survives an unrelated deletion and its undo") | |
| SCENARIO ("Deleting a folded section and undoing it restores the fold") | |
| SCENARIO ("Undoing an insertion whose cell was folded away reveals and removes it") | |
| wxDECLARE_APP (TestApp) | |
| int | main (int argc, char **argv) |
Regression tests for the worksheet's cell-tree undo/redo (the TreeUndo_* subsystem of Worksheet).
The tree-level undo (adding, deleting and changing whole GroupCells, as opposed to editing text inside one cell) had no automated coverage. These tests drive the real undoable edit paths (InsertGroupCells / DeleteRegion / an active-cell text change) on a real Worksheet and check that TreeUndo() restores the tree and TreeRedo() re-applies the edit – a safety net for refactoring TreeUndo into its own class.