Lift the sign-off DRAFT note, fix footer/cursor CLAUDE.md overclaim, honest-en the readout-width test, trim duplicated rationale
Removed DRAFT marker on approved readout strings; corrected "paint and cursor cannot disagree" to note drag-cue suppression; renamed the width test to state it only bounds character count, not pixels; trimmed restated rationale to its CLAUDE.md/header home.
This commit is contained in:
@@ -265,9 +265,8 @@ static void testActiveSegmentStaysLiveEvenWhenUnroutable() {
|
||||
// --- The readout: count, and the drain's pre-emption of it -------------------
|
||||
|
||||
static void testIdleReadsTheCountAndNeitherDrainString() {
|
||||
// Idle is the whole no-work-moving family — an empty queue, an item inside its park
|
||||
// debounce, one held by the transport, one held by an open undo block. The readout
|
||||
// cannot tell them apart and must show the count in every one of them.
|
||||
// Idle covers the whole no-work-moving family: empty queue, park debounce, transport
|
||||
// hold, open undo block — indistinguishable to this predicate (see footer_bar.h).
|
||||
CHECK(footerReadout(FxDrainState::Idle, 0) == "0 tracks");
|
||||
CHECK(footerReadout(FxDrainState::Idle, 1) == "1 track");
|
||||
CHECK(footerReadout(FxDrainState::Idle, 2) == "2 tracks");
|
||||
@@ -294,11 +293,13 @@ static void testTheTwoDirectionsReadDifferently() {
|
||||
CHECK(footerReadout(FxDrainState::Online, 3) != footerReadout(FxDrainState::Offline, 3));
|
||||
}
|
||||
|
||||
static void testDrainReadoutsFitTheCountBox() {
|
||||
// They borrow the count box, so neither may be long enough to make the kit's
|
||||
// end-ellipsis the normal case. Twelve glyphs is the default 64px box's rough capacity
|
||||
// at the panel's smallest font; a longer string wants a wider box, not a silent
|
||||
// truncation.
|
||||
static void testDrainReadoutsStayShort() {
|
||||
// NOT a pixel-width bound. Font::Micro is proportional (~10px, DT_END_ELLIPSIS in
|
||||
// shell/panel/draw_kit.cpp) and this pure footer_bar test links no LICE, so it cannot
|
||||
// measure rendered glyph width without pulling shell drawing into core/ui, which the
|
||||
// pure/shell split (core/ui/CLAUDE.md) forbids. This only catches a readout that grew
|
||||
// unreasonably long in character count; a real overflow end-ellipsizes rather than
|
||||
// breaking layout, so fit is confirmed by the DAW pass, not by this assertion.
|
||||
CHECK(std::string(kFxParkingReadout).size() <= 12);
|
||||
CHECK(std::string(kFxRestoringReadout).size() <= 12);
|
||||
CHECK(!std::string(kFxParkingReadout).empty());
|
||||
@@ -326,7 +327,7 @@ int main() {
|
||||
testIdleReadsTheCountAndNeitherDrainString();
|
||||
testEachDirectionPreEmptsTheCount();
|
||||
testTheTwoDirectionsReadDifferently();
|
||||
testDrainReadoutsFitTheCountBox();
|
||||
testDrainReadoutsStayShort();
|
||||
|
||||
if (g_fail == 0) std::printf("footer_bar: all tests passed\n");
|
||||
else std::printf("footer_bar: %d CHECK(s) FAILED\n", g_fail);
|
||||
|
||||
Reference in New Issue
Block a user