summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2014-05-18 16:13:47 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-26 12:03:07 +0200
commit29c3740534df3fd5eed16f67daf6178b268ad894 (patch)
tree1a22c9ec38f8e507c6f6c9a3bfa3e4054490e71e
parentc711f3870605d58218e0ca9a52a7aac296ecd396 (diff)
downloadqtserialport-29c3740534df3fd5eed16f67daf6178b268ad894.tar.gz
Fix compilation of qserialport auto-test with Qt4
1. The QCOMPARE macro can not make type cast between "int" and "qint64", though on qt5 there are no problems. 2. The QSKIP macro should accept two input parameters. Tested build on Lixux 64bit and Windows with Qt4 and then Qt5. Change-Id: I1f8497201e8d704098faea789bc61829f0d2f9e4 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
-rw-r--r--tests/auto/qserialport/tst_qserialport.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qserialport/tst_qserialport.cpp b/tests/auto/qserialport/tst_qserialport.cpp
index 990f6ee..245c7f2 100644
--- a/tests/auto/qserialport/tst_qserialport.cpp
+++ b/tests/auto/qserialport/tst_qserialport.cpp
@@ -258,7 +258,11 @@ void tst_QSerialPort::handleBytesWrittenAndExitLoopSlot(qint64 bytesWritten)
void tst_QSerialPort::flush()
{
#ifdef Q_OS_WIN
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
QSKIP("flush() does not work on Windows");
+#else
+ QSKIP("flush() does not work on Windows", SkipAll);
+#endif
#endif
QSerialPort serialPort(m_senderPortName);
@@ -289,7 +293,11 @@ void tst_QSerialPort::handleBytesWrittenAndExitLoopSlot2(qint64 bytesWritten)
void tst_QSerialPort::doubleFlush()
{
#ifdef Q_OS_WIN
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
QSKIP("flush() does not work on Windows");
+#else
+ QSKIP("flush() does not work on Windows", SkipAll);
+#endif
#endif
QSerialPort serialPort(m_senderPortName);