mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
@@ -4,7 +4,11 @@
|
||||
* 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
|
||||
{
|
||||
@@ -14,7 +18,17 @@ namespace BlackCoreTest
|
||||
*/
|
||||
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.setHeight(CLength(500, CLengthUnit::ft()));
|
||||
interpolator->addAircraftSituation(situation);
|
||||
|
||||
QVERIFY2(interpolator->hasEnoughAircraftSituations(), "Interpolator should have enough situations!");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#ifndef BLACKCORETEST_TESTAVIATIONBASE_H
|
||||
#define BLACKCORETEST_TESTAVIATIONBASE_H
|
||||
|
||||
#include "blackcore/interpolator.h"
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
namespace BlackCoreTest
|
||||
|
||||
Reference in New Issue
Block a user