mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Ref T259, Ref T243 renamed unit test to CTestInterpolatorLinear
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
* \ingroup testblackmisc
|
* \ingroup testblackmisc
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "testinterpolator.h"
|
#include "testinterpolatorlinear.h"
|
||||||
#include "blackmisc/aviation/aircraftengine.h"
|
#include "blackmisc/aviation/aircraftengine.h"
|
||||||
#include "blackmisc/aviation/aircraftenginelist.h"
|
#include "blackmisc/aviation/aircraftenginelist.h"
|
||||||
#include "blackmisc/aviation/aircraftlights.h"
|
#include "blackmisc/aviation/aircraftlights.h"
|
||||||
@@ -53,7 +53,7 @@ using namespace BlackMisc::Simulation;
|
|||||||
|
|
||||||
namespace BlackMiscTest
|
namespace BlackMiscTest
|
||||||
{
|
{
|
||||||
void CTestInterpolator::linearInterpolator()
|
void CTestInterpolatorLinear::basicInterpolatorTests()
|
||||||
{
|
{
|
||||||
CCallsign cs("SWIFT");
|
CCallsign cs("SWIFT");
|
||||||
CInterpolatorLinear interpolator(cs);
|
CInterpolatorLinear interpolator(cs);
|
||||||
@@ -154,7 +154,7 @@ namespace BlackMiscTest
|
|||||||
qDebug() << timeMs << "ms" << "for" << fetchedParts << "fetched parts";
|
qDebug() << timeMs << "ms" << "for" << fetchedParts << "fetched parts";
|
||||||
}
|
}
|
||||||
|
|
||||||
CAircraftSituation CTestInterpolator::getTestSituation(const CCallsign &callsign, int number, qint64 ts, qint64 deltaT, qint64 offset)
|
CAircraftSituation CTestInterpolatorLinear::getTestSituation(const CCallsign &callsign, int number, qint64 ts, qint64 deltaT, qint64 offset)
|
||||||
{
|
{
|
||||||
const CAltitude alt(number, CAltitude::MeanSeaLevel, CLengthUnit::m());
|
const CAltitude alt(number, CAltitude::MeanSeaLevel, CLengthUnit::m());
|
||||||
const CLatitude lat(number, CAngleUnit::deg());
|
const CLatitude lat(number, CAngleUnit::deg());
|
||||||
@@ -171,7 +171,7 @@ namespace BlackMiscTest
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
CAircraftParts CTestInterpolator::getTestParts(int number, qint64 ts, qint64 deltaT)
|
CAircraftParts CTestInterpolatorLinear::getTestParts(int number, qint64 ts, qint64 deltaT)
|
||||||
{
|
{
|
||||||
CAircraftLights l(true, false, true, false, true, false);
|
CAircraftLights l(true, false, true, false, true, false);
|
||||||
CAircraftEngineList e({ CAircraftEngine(1, true), CAircraftEngine(2, false), CAircraftEngine(3, true) });
|
CAircraftEngineList e({ CAircraftEngine(1, true), CAircraftEngine(2, false), CAircraftEngine(3, true) });
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
* contained in the LICENSE file.
|
* contained in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BLACKMISCTEST_TESTINTERPOLATOR_H
|
#ifndef BLACKMISCTEST_TESTINTERPOLATORLINEAR_H
|
||||||
#define BLACKMISCTEST_TESTINTERPOLATOR_H
|
#define BLACKMISCTEST_TESTINTERPOLATORLINEAR_H
|
||||||
|
|
||||||
//! \cond PRIVATE_TESTS
|
//! \cond PRIVATE_TESTS
|
||||||
|
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include "blackmisc/aviation/aircraftparts.h"
|
#include "blackmisc/aviation/aircraftparts.h"
|
||||||
#include "blackmisc/aviation/aircraftsituation.h"
|
#include "blackmisc/aviation/aircraftsituation.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
@@ -29,17 +28,17 @@ namespace BlackMiscTest
|
|||||||
/*!
|
/*!
|
||||||
* Interpolator classes basic tests
|
* Interpolator classes basic tests
|
||||||
*/
|
*/
|
||||||
class CTestInterpolator : public QObject
|
class CTestInterpolatorLinear : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! Standard test case constructor
|
//! Standard test case constructor
|
||||||
explicit CTestInterpolator(QObject *parent = nullptr) : QObject(parent) {}
|
explicit CTestInterpolatorLinear(QObject *parent = nullptr) : QObject(parent) {}
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
//! Basic unit tests for interpolator
|
//! Basic unit tests for interpolator
|
||||||
void linearInterpolator();
|
void basicInterpolatorTests();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Test situation for testing
|
//! Test situation for testing
|
||||||
Reference in New Issue
Block a user