File indexing completed on 2024-11-03 10:33:31

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 "importexport.h"
0007 
0008 #include <qglobal.h>
0009 #include <qobject.h>
0010 #include <qtest.h>
0011 
0012 #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
0013 #include <qtmetamacros.h>
0014 #else
0015 #include <qobjectdefs.h>
0016 #include <qstring.h>
0017 #endif
0018 
0019 namespace PerceptualColor
0020 {
0021 class TestImportExport : public QObject
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     explicit TestImportExport(QObject *parent = nullptr)
0027         : QObject(parent)
0028     {
0029     }
0030 
0031 private Q_SLOTS:
0032     void initTestCase()
0033     {
0034         // Called before the first test function is executed
0035     }
0036 
0037     void cleanupTestCase()
0038     {
0039         // Called after the last test function was executed
0040     }
0041 
0042     void init()
0043     {
0044         // Called before each test function is executed
0045     }
0046 
0047     void cleanup()
0048     {
0049         // Called after every test function
0050     }
0051 
0052     void testDefined()
0053     {
0054 #ifndef PERCEPTUALCOLOR_IMPORTEXPORT
0055         QVERIFY(false);
0056 #endif
0057     }
0058 };
0059 
0060 } // namespace PerceptualColor
0061 
0062 QTEST_MAIN(PerceptualColor::TestImportExport)
0063 
0064 // The following “include” is necessary because we do not use a header file:
0065 #include "testimportexport.moc"