Commit 860ca0c2 authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

Fix autotest by partially reverting 298a8e32

Autotests tend to fail when you comment out the function being tested.
parent 823b53dc
Pipeline #63914 passed with stage
in 6 minutes and 42 seconds
...@@ -136,7 +136,7 @@ void PlaceItemTest::fillLeftGap() ...@@ -136,7 +136,7 @@ void PlaceItemTest::fillLeftGap()
auto item2 = std::make_unique<TestItem>("item2", 1, 3, 1, 2); auto item2 = std::make_unique<TestItem>("item2", 1, 3, 1, 2);
const QList<CellItem *> cells({item1.get(), item2.get()}); const QList<CellItem *> cells({item1.get(), item2.get()});
auto newItem = std::make_unique<TestItem>("new", 2, 4); auto newItem = std::make_unique<TestItem>("new", 2, 4);
// auto overlappers = CellItem::placeItem(cells, newItem.get()); (void) CellItem::placeItem(cells, newItem.get());
QCOMPARE(newItem->subCell(), item1->subCell()); QCOMPARE(newItem->subCell(), item1->subCell());
QCOMPARE(newItem->subCells(), 2); QCOMPARE(newItem->subCells(), 2);
} }
...@@ -152,7 +152,7 @@ void PlaceItemTest::fillCenterGap() ...@@ -152,7 +152,7 @@ void PlaceItemTest::fillCenterGap()
auto item3 = std::make_unique<TestItem>("item3", 1, 3, 2, 3); auto item3 = std::make_unique<TestItem>("item3", 1, 3, 2, 3);
const QList<CellItem *> cells({item1.get(), item2.get(), item3.get()}); const QList<CellItem *> cells({item1.get(), item2.get(), item3.get()});
auto newItem= std::make_unique<TestItem>("new", 2, 4); auto newItem= std::make_unique<TestItem>("new", 2, 4);
// auto overlappers = CellItem::placeItem(cells, newItem.get()); (void) CellItem::placeItem(cells, newItem.get());
QCOMPARE(newItem->subCell(), item1->subCell()); QCOMPARE(newItem->subCell(), item1->subCell());
QCOMPARE(newItem->subCells(), 3); QCOMPARE(newItem->subCells(), 3);
} }
...@@ -170,7 +170,7 @@ void PlaceItemTest::transitiveOverlap() ...@@ -170,7 +170,7 @@ void PlaceItemTest::transitiveOverlap()
auto item3 = std::make_unique<TestItem>("item3", 1, 3, 1, 2); auto item3 = std::make_unique<TestItem>("item3", 1, 3, 1, 2);
const QList<CellItem *> cells({item1.get(), item2.get(), item3.get()}); const QList<CellItem *> cells({item1.get(), item2.get(), item3.get()});
auto newItem= std::make_unique<TestItem>("new", 2, 4); auto newItem= std::make_unique<TestItem>("new", 2, 4);
// auto overlappers = CellItem::placeItem(cells, newItem.get()); (void) CellItem::placeItem(cells, newItem.get());
QCOMPARE(newItem->subCells(), 3); QCOMPARE(newItem->subCells(), 3);
QCOMPARE(item1->subCells(), 3); QCOMPARE(item1->subCells(), 3);
QCOMPARE(item2->subCells(), 3); QCOMPARE(item2->subCells(), 3);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment