summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2016-08-04 18:43:42 +0300
committerEdward Welbourne <edward.welbourne@qt.io>2016-08-05 08:30:18 +0000
commiteb4bcdd8cec77c558cc75d31730cff89852dd684 (patch)
tree96bdbe70aa29c65d5874129c68071c3797007dd9 /tests
parent91a2c8630b2204831566ab8e523c747f9d8ec927 (diff)
QNativeSocketEngine::option(): return a correct value on invalid call
Instead of 'true', it should be '-1'. Change-Id: I5e8f99153da68d34b37477ef4cedbc447fba347f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
index 71125f463a..ba7659a8a7 100644
--- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
+++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
@@ -139,6 +139,7 @@ void tst_PlatformSocketEngine::construction()
QCOMPARE(socketDevice.peerAddress(), QHostAddress());
QCOMPARE(socketDevice.peerPort(), quint16(0));
QCOMPARE(socketDevice.error(), QAbstractSocket::UnknownSocketError);
+ QCOMPARE(socketDevice.option(QNativeSocketEngine::NonBlockingSocketOption), -1);
QTest::ignoreMessage(QtWarningMsg, PLATFORMSOCKETENGINESTRING "::bytesAvailable() was called in QAbstractSocket::UnconnectedState");
QCOMPARE(socketDevice.bytesAvailable(), -1);