MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / TEST

Function TEST

pj_widgets/tests/progress_bar_test.cpp:19–22  ·  view source on GitHub ↗

The whole reason PJ::ProgressBar exists is to expose a `PJ--ProgressBar` QSS selector. QSS type selectors match on metaObject()->className(), so if Q_OBJECT were ever dropped this would silently fall back to "QProgressBar" and the bespoke style would stop applying. Pin the class name so that regression is a red test, not an unnoticed visual change.

Source from the content-addressed store, hash-verified

17// and the bespoke style would stop applying. Pin the class name so that
18// regression is a red test, not an unnoticed visual change.
19TEST(ProgressBarTest, ClassNameDrivesQssSelector) {
20 PJ::ProgressBar bar;
21 EXPECT_STREQ(bar.metaObject()->className(), "PJ::ProgressBar");
22}
23
24// Sensible defaults so the widget reads like the mockup without per-instance
25// setup: centred caption, text shown.

Callers

nothing calls this directly

Calls 7

setFormatMethod · 0.80
QStringClass · 0.50
alignmentMethod · 0.45
setRangeMethod · 0.45
setValueMethod · 0.45
valueMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected