|
wxMaxima
|
Regression tests for Buttonwrapsizer (the Greek/symbol sidebars' wrap sizer). More...
#include <wx/app.h>#include <wx/button.h>#include <wx/frame.h>#include <wx/log.h>#include <wx/panel.h>#include "sidebars/ButtonWrapSizer.h"#include <cstdlib>#include <vector>#include <unistd.h>#include <catch2/catch.hpp>Data Structures | |
| class | TestApp |
Functions | |
| wxDECLARE_APP (TestApp) | |
| SCENARIO ("Buttonwrapsizer wraps its buttons onto multiple rows") | |
| SCENARIO ("Buttonwrapsizer keeps everything on one row when the panel is wide enough") | |
| SCENARIO ("Buttonwrapsizer wraps when nested like the Greek sidebar") | |
| SCENARIO ("Buttonwrapsizer::HeightForWidth needs more height at a narrower width") | |
| int | main (int argc, char **argv) |
Regression tests for Buttonwrapsizer (the Greek/symbol sidebars' wrap sizer).
The sizer overrides CalcMin() to give every button a uniform, row-filling width, which depends on wxWrapSizer's protected m_availSize. That member is -1 until the first RepositionChildren(), and using it while invalid produced a negative button width that stopped the sidebars wrapping into lines (broke on wxWidgets 3.3). These tests lay out real buttons and check they wrap onto more than one row and never get a non-positive width.