mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
@@ -4,7 +4,11 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "testinterpolator.h"
|
#include "testinterpolator.h"
|
||||||
|
#include "blackcore/interpolator_linear.h"
|
||||||
|
|
||||||
using namespace BlackCore;
|
using namespace BlackCore;
|
||||||
|
using namespace BlackMisc::Aviation;
|
||||||
|
using namespace BlackMisc::PhysicalQuantities;
|
||||||
|
|
||||||
namespace BlackCoreTest
|
namespace BlackCoreTest
|
||||||
{
|
{
|
||||||
@@ -14,7 +18,17 @@ namespace BlackCoreTest
|
|||||||
*/
|
*/
|
||||||
void CTestInterpolator::interpolatorBasics()
|
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
|
} // namespace
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
#ifndef BLACKCORETEST_TESTAVIATIONBASE_H
|
#ifndef BLACKCORETEST_TESTAVIATIONBASE_H
|
||||||
#define BLACKCORETEST_TESTAVIATIONBASE_H
|
#define BLACKCORETEST_TESTAVIATIONBASE_H
|
||||||
|
|
||||||
#include "blackcore/interpolator.h"
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
namespace BlackCoreTest
|
namespace BlackCoreTest
|
||||||
|
|||||||
Reference in New Issue
Block a user