diff options
-rw-r--r-- | tests/auto/qtexttospeech/tst_qtexttospeech.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qvoice/tst_qvoice.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qtexttospeech/tst_qtexttospeech.cpp b/tests/auto/qtexttospeech/tst_qtexttospeech.cpp index 5a2cf7b..b0a6952 100644 --- a/tests/auto/qtexttospeech/tst_qtexttospeech.cpp +++ b/tests/auto/qtexttospeech/tst_qtexttospeech.cpp @@ -40,6 +40,7 @@ #include <QSignalSpy> #include <QMediaDevices> #include <QAudioDevice> +#include <QOperatingSystemVersion> #include <qttexttospeech-config.h> #if QT_CONFIG(speechd) @@ -122,6 +123,11 @@ void tst_QTextToSpeech::init() QSKIP("speechd engine reported a backend error, " "make sure the speech-dispatcher service is running!"); } + } else if (engine == "ios" + && QOperatingSystemVersion::current() <= QOperatingSystemVersion::MacOSMojave) { + QTextToSpeech tts(engine); + if (!tts.availableLocales().count()) + QSKIP("iOS engine is not functional on macOS <= 10.14"); } } diff --git a/tests/auto/qvoice/tst_qvoice.cpp b/tests/auto/qvoice/tst_qvoice.cpp index 0518a13..f0a61b6 100644 --- a/tests/auto/qvoice/tst_qvoice.cpp +++ b/tests/auto/qvoice/tst_qvoice.cpp @@ -37,6 +37,7 @@ #include <QTest> #include <QTextToSpeech> +#include <QOperatingSystemVersion> class tst_QVoice : public QObject { @@ -73,6 +74,11 @@ void tst_QVoice::init() QSKIP("speechd engine reported a backend error, " "make sure the speech-dispatcher service is running!"); } + } else if (engine == "ios" + && QOperatingSystemVersion::current() <= QOperatingSystemVersion::MacOSMojave) { + QTextToSpeech tts(engine); + if (!tts.availableLocales().count()) + QSKIP("iOS engine is not functional on macOS <= 10.14"); } } |