File indexing completed on 2024-04-21 14:47:30

0001 /*
0002     SPDX-FileCopyrightText: 2021 Akarsh Simha <akarsh@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef TEST_STAROBJECT_H
0008 #define TEST_STAROBJECT_H
0009 
0010 #include <QTest>
0011 #include <QDebug>
0012 
0013 #define UNIT_TEST
0014 
0015 #include "skyobjects/starobject.h"
0016 #include "config-kstars.h"
0017 
0018 /**
0019  * @class TestStarObject
0020  * @short Tests for some StarObject operations
0021  * @author Akarsh Simha <akarsh@kde.org>
0022  */
0023 
0024 class TestStarObject : public QObject
0025 {
0026         Q_OBJECT
0027 
0028     public:
0029         TestStarObject();
0030         ~TestStarObject() override;
0031 
0032     private:
0033         void compare(QString msg, double ra1, double dec1, double ra2, double dec2, double err = 0.0001);
0034         void compare(QString msg, double number1, double number2, double tolerance);
0035 
0036     private slots:
0037         void testUpdateCoordsStepByStep();
0038         void testUpdateCoords();
0039 #ifdef HAVE_LIBERFA
0040         void compareProperMotionAgainstErfa_data();
0041         void compareProperMotionAgainstErfa();
0042 #endif
0043     private:
0044         bool useRelativistic {false};
0045 };
0046 
0047 
0048 #endif