From 0d2e59f9e0a9685e9cd94e2557acd2b0e77bce36 Mon Sep 17 00:00:00 2001 From: Massimo Callegari Date: Mon, 30 Dec 2024 15:39:41 +0100 Subject: [PATCH] engine: make RGBSCript test unit backward compatible --- engine/test/rgbscript/rgbscript_test.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/engine/test/rgbscript/rgbscript_test.cpp b/engine/test/rgbscript/rgbscript_test.cpp index d3770e635..f58874a58 100644 --- a/engine/test/rgbscript/rgbscript_test.cpp +++ b/engine/test/rgbscript/rgbscript_test.cpp @@ -214,7 +214,7 @@ void RGBScript_Test::rgbMapColorArray() QColor(Qt::green).rgb() & 0x00ffffff }; QSize mapSize = QSize(5, 5); - qDebug() << "C1: " << Qt::hex << rawRgbColors[0] << " C2: " << Qt::hex << rawRgbColors[1]; + s.rgbMapSetColors(rawRgbColors); s.rgbMap(mapSize, 0, 0, map); QVERIFY(map.isEmpty() == false); @@ -340,12 +340,6 @@ void RGBScript_Test::runScripts() { for (int x = 0; x < mapSize.width(); x++) { - if (rgbMap[y][x] > 0x00ffffff) { - uint pxr = (rgbMap[y][x] >> 16 & 0x000000ff); - uint pxg = (rgbMap[y][x] >> 8 & 0x000000ff); - uint pxb = (rgbMap[y][x] & 0x000000ff); - qDebug() << "height:" << mapSize.height() << "width:" << mapSize.width() << "step:" << step << "y:" << y << "x:" << x << "C:" << Qt::hex << pxr << ":" << Qt::hex << pxg << ":" << Qt::hex << pxb << " (" << Qt::hex << rgbMap[y][x]<< ")"; - } QVERIFY(rgbMap[y][x] <= 0xffffff); } } @@ -371,13 +365,6 @@ void RGBScript_Test::runScripts() if (s.acceptColors() > 0) { // verify that the alpha channel is zero - if (rgbMap[y][x] > 0x00ffffff) - { - uint pxr = (rgbMap[y][x] >> 16 & 0x000000ff); - uint pxg = (rgbMap[y][x] >> 8 & 0x000000ff); - uint pxb = (rgbMap[y][x] & 0x000000ff); - qDebug() << "step:" << step << "x:" << x << "y:" << y << "C:" << Qt::hex << pxr << ":" << Qt::hex << pxg << ":" << Qt::hex << pxb << " (" << Qt::hex << rgbMap[y][x]<< ")"; - } QVERIFY((rgbMap[y][x] & 0xff000000) == 0); QVERIFY((rgbMap[y][x] >> 16) <= 0x0000ff); if (!randomScript && 0 == step && 1 < s.acceptColors() && 2 < steps)