File indexing completed on 2024-04-28 15:11:56

0001 /*  KStars class tests
0002     SPDX-FileCopyrightText: 2020 Eric Dejouhanet <eric.dejouhanet@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include <QTest>
0008 #include <QApplication>
0009 
0010 #include "testcsvparser.h"
0011 #include "testfwparser.h"
0012 #include "testdms.h"
0013 #include "testcachingdms.h"
0014 #include "testcolorscheme.h"
0015 #include "testbinhelper.h"
0016 #include "testfov.h"
0017 #include "testgeolocation.h"
0018 #include "testksuserdb.h"
0019 
0020 #define RUN(result, TestClass) do { \
0021     TestClass tc; \
0022     result |= QTest::qExec(&tc, argc, argv); } while(false)
0023 
0024 int main(int argc, char *argv[])
0025 {
0026     QCoreApplication app(argc, argv);
0027     app.setAttribute(Qt::AA_Use96Dpi, true);
0028     QTEST_SET_MAIN_SOURCE_PATH \
0029 
0030     int result = 0;
0031 
0032     RUN(result, TestCSVParser);
0033     RUN(result, TestFWParser);
0034     RUN(result, TestDMS);
0035     RUN(result, TestCachingDms);
0036     RUN(result, TestColorScheme);
0037     RUN(result, TestBinHelper);
0038     RUN(result, TestFOV);
0039     RUN(result, TestGeolocation);
0040     RUN(result, TestKSUserDB);
0041 
0042     return result;
0043 }