summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2013-12-06 13:36:03 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-06 15:06:47 +0100
commit1efe5d4b4141ef7b47c692f244178496578f15ae (patch)
tree458ba7c8fcf643464bf63313f1c827c21e9a8cc4 /tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
parentfadcb0a72b59a8c7082dc9c893b76125b8f6caf3 (diff)
WinRT: Fixed compilation of network autotests and benchmarks
Change-Id: Id689f199cfb22dce231cec36faba57ab958b1bac Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Diffstat (limited to 'tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp')
-rw-r--r--tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
index f474f97f5d..35028735e2 100644
--- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
+++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
@@ -64,7 +64,11 @@
#define PLATFORMSOCKETENGINE QNativeSocketEngine
#define PLATFORMSOCKETENGINESTRING "QNativeSocketEngine"
-#include <private/qnativesocketengine_p.h>
+#ifndef Q_OS_WINRT
+# include <private/qnativesocketengine_p.h>
+#else
+# include <private/qnativesocketengine_winrt_p.h>
+#endif
#include <qstringlist.h>
@@ -97,7 +101,9 @@ private slots:
void networkError();
void setSocketDescriptor();
void invalidSend();
+#ifndef Q_OS_WINRT
void receiveUrgentData();
+#endif
void tooManySockets();
};
@@ -608,7 +614,9 @@ void tst_PlatformSocketEngine::networkError()
QVERIFY(client.state() == QAbstractSocket::ConnectedState);
// An unexpected network error!
-#ifdef Q_OS_WIN
+#ifdef Q_OS_WINRT
+ client.close();
+#elif defined(Q_OS_WIN)
// could use shutdown to produce different errors
::closesocket(client.socketDescriptor());
#else
@@ -641,6 +649,7 @@ void tst_PlatformSocketEngine::invalidSend()
}
//---------------------------------------------------------------------------
+#ifndef Q_OS_WINRT
void tst_PlatformSocketEngine::receiveUrgentData()
{
PLATFORMSOCKETENGINE server;
@@ -703,6 +712,7 @@ void tst_PlatformSocketEngine::receiveUrgentData()
QCOMPARE(response.at(0), msg);
#endif
}
+#endif // !Q_OS_WINRT
QTEST_MAIN(tst_PlatformSocketEngine)
#include "tst_platformsocketengine.moc"