autotests: Remove invalid cases in testScreens

The Workspace requires at least one output and no output has 0x0 size.

This fixes a crash in confineToBoundingBox() where qBound() asserts that
the min value is less than the max value, in our case the x coordinate
of the left edge of the workspace is less than the x coordinate of the
right edge of the workspace.
This commit is contained in:
Vlad Zahorodnii 2022-10-21 17:03:59 +03:00
parent 49ad013295
commit ae01354638

View file

@ -117,7 +117,6 @@ void ScreensTest::testCurrentWithFollowsMouse_data()
QTest::addColumn<QPoint>("cursorPos");
QTest::addColumn<int>("expectedId");
QTest::newRow("empty") << QVector<QRect>{{QRect()}} << QPoint(100, 100) << 0;
QTest::newRow("cloned") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{0, 0, 200, 100}}} << QPoint(50, 50) << 0;
QTest::newRow("adjacent-0") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(199, 99) << 0;
QTest::newRow("adjacent-1") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(200, 100) << 1;
@ -150,7 +149,6 @@ void ScreensTest::testCurrentPoint_data()
QTest::addColumn<QPoint>("cursorPos");
QTest::addColumn<int>("expectedId");
QTest::newRow("empty") << QVector<QRect>{{QRect()}} << QPoint(100, 100) << 0;
QTest::newRow("cloned") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{0, 0, 200, 100}}} << QPoint(50, 50) << 0;
QTest::newRow("adjacent-0") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(199, 99) << 0;
QTest::newRow("adjacent-1") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(200, 100) << 1;