MCPcopy Create free account
hub / github.com/KDE/labplot / TestAddingHorizontalAxis

Method TestAddingHorizontalAxis

tests/backend/Axis/AxisTest.cpp:473–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473void AxisTest::TestAddingHorizontalAxis() {
474 Project project;
475 auto* ws = new Worksheet(QStringLiteral("worksheet"));
476 QVERIFY(ws != nullptr);
477 project.addChild(ws);
478
479 auto* p = new CartesianPlot(QStringLiteral("plot"));
480 QVERIFY(p != nullptr);
481 p->setType(CartesianPlot::Type::TwoAxes); // Otherwise no axes are created
482 ws->addChild(p);
483
484 p->addHorizontalAxis(); // should not crash
485}
486
487void AxisTest::TestAddingVerticalAxis() {
488 Project project;

Callers

nothing calls this directly

Calls 3

addHorizontalAxisMethod · 0.80
addChildMethod · 0.45
setTypeMethod · 0.45

Tested by

no test coverage detected