13.19d: 2190a1b verified; sizeLabel's ties tested; tests read optionals through value(); two mask tests brought to 13.12

This commit is contained in:
ZacharyZhang-NY committed 2026-10-03 19:16:59 -04:00
1 parent ab34fd6ace
commit 3757eb8910
40 files changed
+233 -220

No files matched your search

+5 -5
View File
@@ -437,15 +437,15 @@ void RasterSnapshotTests::historyBudgetNeverFlattensPaintedTiles()
const auto raster = std::make_shared<const RasterSnapshot>(40, 30, QImage(), QRectF(), std::vector<BrushPatch>());
DocumentHistory history;
std::optional<CanvasDocument> document = CanvasDocument(40, 30);
document->layers.push_back(ImageLayer(painted(raster), QPointF(0, 0)));
QVERIFY(document->layers[0] == ImageLayer(document->layers[0]));
document.value().layers.push_back(ImageLayer(painted(raster), QPointF(0, 0)));
QVERIFY(document.value().layers[0] == ImageLayer(document.value().layers[0]));
history.begin("Select Layer", document, std::nullopt);
history.end(document, document->layers[0].id);
history.end(document, document.value().layers[0].id);
QCOMPARE(history.undoCount(), 0);
QVERIFY(!raster->hasMaterializedPixels());
history.begin("Delete Layer", document, std::nullopt);
const qint64 thumbnailBytes = document->layers[0].asset->thumbnail.sizeInBytes();
document->layers.clear();
const qint64 thumbnailBytes = document.value().layers[0].asset.value().thumbnail.sizeInBytes();
document.value().layers.clear();
history.end(document, std::nullopt);
QCOMPARE(history.retainedBytes(document), qint64(40 * 30 * 4) + thumbnailBytes);
QVERIFY(!raster->hasMaterializedPixels());