diff --git a/Tests/kstars_ui/kstars_ui_tests.cpp b/Tests/kstars_ui/kstars_ui_tests.cpp --- a/Tests/kstars_ui/kstars_ui_tests.cpp +++ b/Tests/kstars_ui/kstars_ui_tests.cpp @@ -98,8 +98,10 @@ QEXPECT_FAIL("", "Precision of KStars local time conversion to local time does not allow strict millisecond comparison.", Continue); QCOMPARE(KStars::Instance()->data()->clock()->utc().toLocalTime(), m_InitialConditions.dateTime); +#if QT_VERSION >= 0x050800 // However comparison down to nearest second is expected to be OK QCOMPARE(llround(KStars::Instance()->data()->clock()->utc().toLocalTime().toMSecsSinceEpoch()/1000.0), m_InitialConditions.dateTime.toSecsSinceEpoch()); +#endif } // We want to launch the application before running our tests diff --git a/Tests/kstars_ui/test_ekos_simulator.cpp b/Tests/kstars_ui/test_ekos_simulator.cpp --- a/Tests/kstars_ui/test_ekos_simulator.cpp +++ b/Tests/kstars_ui/test_ekos_simulator.cpp @@ -52,6 +52,9 @@ void TestEkosSimulator::testMountSlew_data() { +#if QT_VERSION < 0x050900 + QSKIP("Skipping fixture-based test on old QT version."); +#else QTest::addColumn("NAME"); QTest::addColumn("RA"); QTest::addColumn("DEC"); @@ -79,10 +82,14 @@ << so->dec().toDMSString(); } } +#endif } void TestEkosSimulator::testMountSlew() { +#if QT_VERSION < 0x050900 + QSKIP("Skipping fixture-based test on old QT version."); +#else Ekos::Manager * const ekos = Ekos::Manager::Instance(); QFETCH(QString, NAME); @@ -149,6 +156,8 @@ QWARN(QString("Target '%1' slewed to with coordinate offset DEC %2").arg(NAME).arg(DEC).toStdString().c_str()); QVERIFY(Ekos::Manager::Instance()->mountModule()->abort()); +#endif } + #endif