1 /*
2     SPDX-FileCopyrightText: 2021 Akarsh Simha <akarsh@kde.org>
3 
4     SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #ifndef TEST_STAROBJECT_H
8 #define TEST_STAROBJECT_H
9 
10 #include <QtTest/QtTest>
11 #include <QDebug>
12 
13 #define UNIT_TEST
14 
15 #include "skyobjects/starobject.h"
16 #include "config-kstars.h"
17 
18 /**
19  * @class TestStarObject
20  * @short Tests for some StarObject operations
21  * @author Akarsh Simha <akarsh@kde.org>
22  */
23 
24 class TestStarObject : public QObject
25 {
26         Q_OBJECT
27 
28     public:
29         TestStarObject();
30         ~TestStarObject() override;
31 
32     private:
33         void compare(QString msg, double ra1, double dec1, double ra2, double dec2, double err = 0.0001);
34         void compare(QString msg, double number1, double number2, double tolerance);
35 
36     private slots:
37         void testUpdateCoordsStepByStep();
38         void testUpdateCoords();
39 #ifdef HAVE_LIBERFA
40         void compareProperMotionAgainstErfa_data();
41         void compareProperMotionAgainstErfa();
42 #endif
43     private:
44         bool useRelativistic {false};
45 };
46 
47 
48 #endif
49