File indexing completed on 2024-05-12 04:44:27

0001 // SPDX-FileCopyrightText: Lukas Sommer <sommerluk@gmail.com>
0002 // SPDX-License-Identifier: BSD-2-Clause OR MIT
0003 
0004 // First included header is the public header of the class we are testing;
0005 // this forces the header to be self-contained.
0006 #include "oklchvalues.h"
0007 
0008 #include <qglobal.h>
0009 #include <qobject.h>
0010 #include <qtest.h>
0011 #include <qtestcase.h>
0012 
0013 #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
0014 #include <qtmetamacros.h>
0015 #else
0016 #include <qobjectdefs.h>
0017 #include <qstring.h>
0018 #endif
0019 
0020 namespace PerceptualColor
0021 {
0022 class TestOklchValues : public QObject
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     explicit TestOklchValues(QObject *parent = nullptr)
0028         : QObject(parent)
0029     {
0030     }
0031 
0032 private Q_SLOTS:
0033 
0034     void initTestCase()
0035     {
0036         // Called before the first test function is executed
0037     }
0038 
0039     void cleanupTestCase()
0040     {
0041         // Called after the last test function was executed
0042     }
0043 
0044     void init()
0045     {
0046         // Called before each test function is executed
0047     }
0048     void cleanup()
0049     {
0050         // Called after every test function
0051     }
0052 
0053     void testMaximumChroma()
0054     {
0055         QVERIFY(OklchValues::maximumChroma > 0);
0056         // TODO xxx Load all profiles to see if none has a higher chroma!
0057     }
0058 };
0059 
0060 } // namespace PerceptualColor
0061 
0062 QTEST_MAIN(PerceptualColor::TestOklchValues)
0063 // The following “include” is necessary because we do not use a header file:
0064 #include "testoklchvalues.moc"