[education/labplot] tests: Adjusted those tests where a fixed number of points in XYEquationCurve is being checked.

Alexander Semke <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 323117d0109ddc5098737ad3ef76b1603647b1c8 by Alexander Semke.
Committed on 20/07/2026 at 20:28.
Pushed by sgerlach into branch 'master'.

Adjusted those tests where a fixed number of points in XYEquationCurve is being checked.

M  +1    -0    tests/backend/Retransform/RetransformTest.cpp
M  +1    -3    tests/backend/XYCurve/XYCurveTest.cpp
M  +3    -0    tests/backend/XYCurve/XYFunctionCurveTest.cpp
M  +1    -0    tests/cartesianplot/CartesianPlotTest.cpp

https://invent.kde.org/education/labplot/-/commit/323117d0109ddc5098737ad3ef76b1603647b1c8

diff --git a/tests/backend/Retransform/RetransformTest.cpp b/tests/backend/Retransform/RetransformTest.cpp
index 1daa467e58..2c79a46dea 100644
--- a/tests/backend/Retransform/RetransformTest.cpp
+++ b/tests/backend/Retransform/RetransformTest.cpp
@@ -1993,6 +1993,7 @@ void RetransformTest::xyFunctionCurve() {
 	auto* equationCurve = static_cast<XYEquationCurve*>(equationCurves.at(0));
 	XYEquationCurve::EquationData data;
 	data.count = 100;
+	data.autoPointsCount = false;
 	data.expression1 = QStringLiteral("x");
 	data.expression2 = QString();
 	data.min = QStringLiteral("1");
diff --git a/tests/backend/XYCurve/XYCurveTest.cpp b/tests/backend/XYCurve/XYCurveTest.cpp
index 586b5ca900..d22fc7a206 100644
--- a/tests/backend/XYCurve/XYCurveTest.cpp
+++ b/tests/backend/XYCurve/XYCurveTest.cpp
@@ -2019,12 +2019,10 @@ void XYCurveTest::updateLinesLog10() {
 			QLineF(QPointF(7.8, 7.8), QPointF(8.9, 8.9)),
 			QLineF(QPointF(8.9, 8.9), QPointF(10, 10)),
 		};
-		QCOMPARE(linearPrivate->m_logicalPoints.size(), refLines.size() + 1); // last row is invalid so it will be omitted
 		auto test_lines = linearPrivate->m_lines;
 		QCOMPARE(refLines.size(), test_lines.size());
-		for (int i = 0; i < test_lines.size(); i++) {
+		for (int i = 0; i < test_lines.size(); i++)
 			COMPARE_LINES(test_lines.at(i), refLines.at(i));
-		}
 	});
 	linearPrivate->updateLines();
 	QCOMPARE(updateLinesCalled, true);
diff --git a/tests/backend/XYCurve/XYFunctionCurveTest.cpp b/tests/backend/XYCurve/XYFunctionCurveTest.cpp
index 4dd72aea5c..d8d9d56d75 100644
--- a/tests/backend/XYCurve/XYFunctionCurveTest.cpp
+++ b/tests/backend/XYCurve/XYFunctionCurveTest.cpp
@@ -41,6 +41,7 @@ void XYFunctionCurveTest::setCurves() {
 	auto* equationCurve = static_cast<XYEquationCurve*>(equationCurves.at(0));
 	XYEquationCurve::EquationData data;
 	data.count = 100;
+	data.autoPointsCount = false;
 	data.expression1 = QStringLiteral("x");
 	data.expression2 = QString();
 	data.min = QStringLiteral("1");
@@ -231,6 +232,7 @@ void XYFunctionCurveTest::removeCurveRenameAutomaticAdd() {
 	auto* equationCurve = static_cast<XYEquationCurve*>(equationCurves.at(0));
 	XYEquationCurve::EquationData data;
 	data.count = 100;
+	data.autoPointsCount = false;
 	data.expression1 = QStringLiteral("x");
 	data.expression2 = QString();
 	data.min = QStringLiteral("1");
@@ -314,6 +316,7 @@ void XYFunctionCurveTest::saveLoad() {
 		auto* equationCurve = static_cast<XYEquationCurve*>(equationCurves.at(0));
 		XYEquationCurve::EquationData data;
 		data.count = 100;
+		data.autoPointsCount = false;
 		data.expression1 = QStringLiteral("x");
 		data.expression2 = QString();
 		data.min = QStringLiteral("1");
diff --git a/tests/cartesianplot/CartesianPlotTest.cpp b/tests/cartesianplot/CartesianPlotTest.cpp
index 729fb7a49b..8540d0af11 100644
--- a/tests/cartesianplot/CartesianPlotTest.cpp
+++ b/tests/cartesianplot/CartesianPlotTest.cpp
@@ -1203,6 +1203,7 @@ void CartesianPlotTest::wheelEventNotCenter() {
 	data.min = QStringLiteral("0");
 	data.max = QStringLiteral("10");
 	data.count = 10;
+	data.autoPointsCount = false;
 	data.expression1 = QStringLiteral("x");
 	equationCurve->setEquationData(data);
 	equationCurve->recalculate();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.