mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
* consolidated ICoordinateGeodetic (e.g. fixed nested properties) * shifted common functionality for objects/containers with callsign into interface * shifted common functionality for objects/containers with geo position into interface * shifted common functionality for objects/containers with timestamp into interface * updated corresponding value objects / specialized lists * adjusted all places where renamed functions are used
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
/* Copyright (C) 2013 VATSIM Community / contributors
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "testinterpolator.h"
|
|
#include "blackcore/interpolator_linear.h"
|
|
|
|
using namespace BlackCore;
|
|
using namespace BlackMisc::Aviation;
|
|
using namespace BlackMisc::PhysicalQuantities;
|
|
|
|
namespace BlackCoreTest
|
|
{
|
|
|
|
/*
|
|
* Interpolator tests
|
|
*/
|
|
void CTestInterpolator::interpolatorBasics()
|
|
{
|
|
IInterpolator *interpolator = new CInterpolatorLinear();
|
|
QVERIFY2(!interpolator->hasEnoughAircraftSituations(), "Interpolator cannot have enough situations. They should be 0!");
|
|
|
|
CAircraftSituation situation;
|
|
interpolator->addAircraftSituation(situation);
|
|
QTest::qSleep(6100);
|
|
situation.setAltitude(CAltitude(500, CAltitude::MeanSeaLevel, CLengthUnit::ft()));
|
|
interpolator->addAircraftSituation(situation);
|
|
|
|
QVERIFY2(interpolator->hasEnoughAircraftSituations(), "Interpolator should have enough situations!");
|
|
}
|
|
|
|
} // namespace
|