|
wxMaxima
|
Regression test for MaximaMenuSync, the declarative variable-to-menu-items table that replaced a dozen hand-written VariableAction* handlers in the wxMaxima class. More...
#include <wx/app.h>#include <wx/frame.h>#include <wx/log.h>#include <wx/menu.h>#include "MaximaMenuSync.h"#include <cstdlib>#include <set>#include <unistd.h>#include <catch2/catch.hpp>Data Structures | |
| class | TestApp |
Functions | |
| wxDECLARE_APP (TestApp) | |
| SCENARIO ("The table is internally consistent") | |
| SCENARIO ("A boolean variable toggles its check item") | |
| SCENARIO ("An inverted boolean is only unchecked on its 'off' value") | |
| SCENARIO ("A multiple-choice variable checks the matching radio item") | |
| SCENARIO ("A suffix-matched variable ignores a prefix on the value") | |
| SCENARIO ("Receiving a value at all can unlock a feature's menu") | |
| SCENARIO ("Variables without a table row are reported as unhandled") | |
| int | main (int argc, char **argv) |
Regression test for MaximaMenuSync, the declarative variable-to-menu-items table that replaced a dozen hand-written VariableAction* handlers in the wxMaxima class.
It builds a menu bar containing real check/radio items for every table row (with the row's genuine menu ids) and then feeds variable values through SyncMenusToMaximaVariable(), asserting on the resulting check marks - one scenario per match kind, plus the enable-on-any-value side effect and the table's internal consistency.