|
wxMaxima
|
Regression tests for the worksheet's right-click context menu. More...
#include <wx/app.h>#include <wx/bitmap.h>#include <wx/dcmemory.h>#include <wx/frame.h>#include <wx/log.h>#include <wx/menu.h>#include <wx/mstream.h>#include "Configuration.h"#include "worksheet/Worksheet.h"#include "worksheet/WorksheetContextMenu.h"#include "cells/EditorCell.h"#include "cells/GroupCell.h"#include "cells/ImgCell.h"#include <cstdlib>#include <unistd.h>#include <catch2/catch.hpp>Data Structures | |
| class | TestApp |
Functions | |
| SCENARIO ("The between-cells (hCaret) menu offers paste, select-all and cell insertion") | |
| SCENARIO ("The selected-group-cell menu offers copy, delete and evaluation") | |
| SCENARIO ("The selected-image menu offers saving and image manipulation") | |
| SCENARIO ("The active-cell menu offers editing operations") | |
| wxDECLARE_APP (TestApp) | |
| int | main (int argc, char **argv) |
Regression tests for the worksheet's right-click context menu.
PopulateWorksheetContextMenu builds the menu as a function of the worksheet's state without showing it, so we can drive the main states a right click can hit (cursor between cells, a selected group cell, a selected image cell, an active editor cell) on a real Worksheet and check that the expected entries appear. This pins the menu across refactorings of the builder - it was extracted verbatim out of a 868-line Worksheet::OnMouseRightDown.