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

Method baseDockSetAspects_NoPlotRangeChange

tests/multirange/MultiRangeTest3.cpp:17–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#include "backend/worksheet/plots/cartesian/Histogram.h"
16
17void MultiRangeTest3::baseDockSetAspects_NoPlotRangeChange() {
18 LOAD_PROJECT
19
20 const int sinCurveCSystemIndex = sinCurve->coordinateSystemIndex();
21 const int tanCurveCSystemIndex = tanCurve->coordinateSystemIndex();
22 QVERIFY(sinCurveCSystemIndex != tanCurveCSystemIndex);
23 // checks directly the plot. In the basedock the element is used and not the plot, so do it here too
24 QVERIFY(sinCurve->coordinateSystemCount() == 3);
25
26 XYCurveDock dock(nullptr);
27 dock.setupGeneral();
28 dock.setCurves(QList<XYCurve*>({sinCurve, tanCurve}));
29
30 dock.updatePlotRangeList();
31
32 // The coordinatesystem indices shall not change
33 QCOMPARE(sinCurveCSystemIndex, sinCurve->coordinateSystemIndex());
34 QCOMPARE(tanCurveCSystemIndex, tanCurve->coordinateSystemIndex());
35}
36
37/*!
38 * \brief MultiRangeTest3::curveRangeChange

Callers

nothing calls this directly

Calls 5

coordinateSystemIndexMethod · 0.80
coordinateSystemCountMethod · 0.45
setupGeneralMethod · 0.45
setCurvesMethod · 0.45
updatePlotRangeListMethod · 0.45

Tested by

no test coverage detected