1 /**************************************************************************** 2 ** 3 ** Copyright (C) 2016 The Qt Company Ltd. 4 ** Contact: https://www.qt.io/licensing/ 5 ** 6 ** This file is part of the QtLocation module of the Qt Toolkit. 7 ** 8 ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ 9 ** Commercial License Usage 10 ** Licensees holding valid commercial Qt licenses may use this file in 11 ** accordance with the commercial license agreement provided with the 12 ** Software or, alternatively, in accordance with the terms contained in 13 ** a written agreement between you and The Qt Company. For licensing terms 14 ** and conditions see https://www.qt.io/terms-conditions. For further 15 ** information use the contact form at https://www.qt.io/contact-us. 16 ** 17 ** GNU General Public License Usage 18 ** Alternatively, this file may be used under the terms of the GNU 19 ** General Public License version 3 as published by the Free Software 20 ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT 21 ** included in the packaging of this file. Please review the following 22 ** information to ensure the GNU General Public License requirements will 23 ** be met: https://www.gnu.org/licenses/gpl-3.0.html. 24 ** 25 ** $QT_END_LICENSE$ 26 ** 27 ****************************************************************************/ 28 29 #ifndef TST_QGEOMANEUVER_H 30 #define TST_QGEOMANEUVER_H 31 32 33 #include <QtCore/QString> 34 #include <QtTest/QtTest> 35 #include <QtCore/QCoreApplication> 36 #include <QMetaType> 37 #include <QSignalSpy> 38 39 #include "../utils/qlocationtestutils_p.h" 40 #include <qgeomaneuver.h> 41 #include <qgeocoordinate.h> 42 43 44 class tst_QGeoManeuver : public QObject 45 { 46 Q_OBJECT 47 48 public: 49 tst_QGeoManeuver(); 50 51 private Q_SLOTS: 52 void initTestCase(); 53 void cleanupTestCase(); 54 void init(); 55 void cleanup(); 56 57 //Start unit test for QGeoRouteManeuver 58 void constructor(); 59 void copy_constructor(); 60 void destructor(); 61 void direction(); 62 void direction_data(); 63 void distanceToNextInstruction(); 64 void instructionText(); 65 void position(); 66 void position_data(); 67 void timeToNextInstruction(); 68 void waypoint(); 69 void waypoint_data(); 70 void isValid(); 71 void operators(); 72 void alternateImplementation(); 73 //End Unit Test for QGeoRouteManeuver 74 75 private: 76 QGeoManeuver *qgeomaneuver; 77 QGeoCoordinate *qgeocoordinate; 78 79 }; 80 81 Q_DECLARE_METATYPE( QList<double>); 82 Q_DECLARE_METATYPE (QGeoManeuver::InstructionDirection); 83 84 #endif // TST_QGEOMANEUVER_H 85 86