Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Add a test for checking profiles set cicp values correctly.
Wolthera van Hövell tot Westerflieree486f43c079
diff --git a/plugins/color/lcms2engine/tests/TestProfileGeneration.cpp b/plugins/color/lcms2engine/tests/TestProfileGeneration.cppindex cea2bcd9b4..2c3265d54f 100644--- a/plugins/color/lcms2engine/tests/TestProfileGeneration.cpp+++ b/plugins/color/lcms2engine/tests/TestProfileGeneration.cpp@@ -13,6 +13,9 @@#include <KoColorConversions.h>#include <KoColorTransferFunctions.h>#include <kis_debug.h>+#include <KoColorSpaceEngine.h>+#include <KoColorProfile.h>+#include <testpigment.h>void TestProfileGeneration::testTransferFunctions()@@ -387,4 +390,17 @@ void TestProfileGeneration::testTransferFunctions()}+void TestProfileGeneration::testCICPwriting()+{+ QVector<double> colorants;+ const KoColorProfile *profile = KoColorSpaceRegistry::instance()->profileFor(colorants, PRIMARIES_ITU_R_BT_2020_2_AND_2100_0, TRC_ITU_R_BT_2020_2_12bit);++ QVERIFY(profile);++ // TODO: write and reload the profile.++ QVERIFY(profile->getColorPrimaries() == PRIMARIES_ITU_R_BT_2020_2_AND_2100_0);+ QVERIFY(profile->getTransferCharacteristics() == TRC_ITU_R_BT_2020_2_12bit);+}+KISTEST_MAIN(TestProfileGeneration)diff --git a/plugins/color/lcms2engine/tests/TestProfileGeneration.h b/plugins/color/lcms2engine/tests/TestProfileGeneration.hindex f262cab5cd..b1f2b51cce 100644--- a/plugins/color/lcms2engine/tests/TestProfileGeneration.h+++ b/plugins/color/lcms2engine/tests/TestProfileGeneration.h@@ -13,6 +13,7 @@ class TestProfileGeneration : public QObjectQ_OBJECTprivate Q_SLOTS:void testTransferFunctions();+ void testCICPwriting();};