Unit tests for the worksheet's virtual-size arithmetic (ComputeWorksheetVirtualSize).
More...
#include "worksheet/WorksheetSizeMath.h"
#include <catch2/catch.hpp>
|
|
| SCENARIO ("A tall document gets a scroll range proportional to its height") |
| |
|
| SCENARIO ("A short document still keeps a vertical scrollbar active") |
| |
|
| SCENARIO ("The virtual size never shrinks below the current scroll position") |
| |
|
| SCENARIO ("An empty worksheet gets a small fixed size and a sane scroll unit") |
| |
|
| SCENARIO ("The scroll unit scales with the window but never drops below 10") |
| |
|
| SCENARIO ("The content height is pinned to the anchor cell's top") |
| |
|
| SCENARIO ("Non-stale but unpositioned trailing cells reserve a nominal height") |
| |
|
| SCENARIO ("Without an anchor the height falls back to the base indent") |
| |
|
| SCENARIO ("The content width is the widest cell, floored at the base indent") |
| |
|
| SCENARIO ("Applying the virtual size pushes the computed extent to the view") |
| |
|
| SCENARIO ("An unchanged virtual size is not re-applied") |
| |
|
| SCENARIO ("Without a tree the scroll position is not consulted") |
| |
|
| SCENARIO ("A tiny document scrolled far down keeps the scroll position valid") |
| |
|
int | main (int argc, char *argv[]) |
| |
Unit tests for the worksheet's virtual-size arithmetic (ComputeWorksheetVirtualSize).
The math is GUI-free so it can be exercised directly, unlike Worksheet::AdjustSize() which reads the live window size. These pin the scroll-range contract that "the pane won't scroll" bugs violate.