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

Method shiftUp_SingleRange

tests/multirange/MultiRangeTest.cpp:763–792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

761}
762
763void MultiRangeTest::shiftUp_SingleRange() {
764 LOAD_PROJECT
765 auto refValuesAxis1 = vertAxisP1->tickLabelValues();
766 auto refValuesAxis2 = vertAxis2P1->tickLabelValues();
767 auto refValuesAxis3 = vertAxis3P1->tickLabelValues();
768 vertAxisP1->setSelected(true);
769 p1->shiftUpY(0);
770
771 CHECK_RANGE(p1, sinCurve, Dimension::X, 0., 1.);
772 CHECK_RANGE(p1, sinCurve, Dimension::Y, -1., 1.);
773 CHECK_RANGE(p1, tanCurve, Dimension::X, 0., 1.);
774 CHECK_RANGE(p1, tanCurve, Dimension::Y, -300., 200.); // shift
775 CHECK_RANGE(p1, logCurve, Dimension::X, 0., 100.);
776 CHECK_RANGE(p1, logCurve, Dimension::Y, -10., 6.);
777
778 // check auto scale
779 p1->navigate(0, CartesianPlot::NavigationOperation::ScaleAutoY);
780
781 CHECK_RANGE(p1, sinCurve, Dimension::X, 0., 1.);
782 CHECK_RANGE(p1, sinCurve, Dimension::Y, -1., 1.);
783 CHECK_RANGE(p1, tanCurve, Dimension::X, 0., 1.);
784 CHECK_RANGE(p1, tanCurve, Dimension::Y, -250., 250.);
785 CHECK_RANGE(p1, logCurve, Dimension::X, 0., 100.);
786 CHECK_RANGE(p1, logCurve, Dimension::Y, -10., 6.);
787
788 // retransform of vertAxisP1 is done, so the tickLabelValues change back
789 COMPARE_DOUBLE_VECTORS(vertAxisP1->tickLabelValues(), refValuesAxis1);
790 COMPARE_DOUBLE_VECTORS(vertAxis2P1->tickLabelValues(), refValuesAxis2);
791 COMPARE_DOUBLE_VECTORS(vertAxis3P1->tickLabelValues(), refValuesAxis3);
792}
793
794void MultiRangeTest::shiftDown_SingleRange() {
795 LOAD_PROJECT

Callers

nothing calls this directly

Calls 4

tickLabelValuesMethod · 0.80
shiftUpYMethod · 0.80
navigateMethod · 0.80
setSelectedMethod · 0.45

Tested by

no test coverage detected