File indexing completed on 2025-01-19 03:57:45

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 28/08/2021
0007  * Description : an unit-test to detect image quality level
0008  *
0009  * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2021-2022 by Phuoc Khanh Le <phuockhanhnk94 at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #include "detectaesthetic_utest.h"
0017 
0018 // Qt includes
0019 
0020 #include <QTest>
0021 #include <QStringList>
0022 #include <QFileInfoList>
0023 #include <QDebug>
0024 #include <QDir>
0025 
0026 // Local includes
0027 
0028 #include "digikam_globals.h"
0029 #include "imagequalitycontainer.h"
0030 #include "dpluginloader.h"
0031 #include "digikam_debug.h"
0032 
0033 QTEST_MAIN(ImgQSortTestDetectQesthetic)
0034 
0035 ImgQSortTestDetectQesthetic::ImgQSortTestDetectQesthetic(QObject* const parent)
0036     : ImgQSortTest(parent)
0037 {
0038     m_dataTestCases = dataTestCases;
0039 }
0040 
0041 void ImgQSortTestDetectQesthetic::testParseTestImagesForAestheticDetection()
0042 {
0043    QHash<QString, bool> results = testParseTestImages(QLatin1String("aestheticDetection"),
0044                                                       ImgQSortTest_ParseTestImagesDefautDetection, DETECTAESTHETIC);
0045 
0046     for (const auto& test_case : results.keys())
0047     {
0048         QVERIFY(results.value(test_case));
0049     }
0050 }
0051 
0052 #include "moc_detectaesthetic_utest.cpp"