aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2013-12-07 12:54:09 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-10 11:46:11 +0100
commit7d35f5c6b7b8b187388523674b4a95585f369d78 (patch)
tree9c56fc7bc7eddc0da37e0d144e054eef288eb1e2 /tests
parent7c8d645c4759f7290fd31fe439abf0a99aac9161 (diff)
Cleanup code to comply with Qt style
- Correct placement of curly braces - Remove commented-out code - Remove superfluous qDebug statements - Add missing QT_BEGIN_NAMESPACE declarations - Add move semantics - Add cleanup handling to QWebSocketServerPrivate - Add error handling to handshake response, QWebSocketServerPrivate, QWebSocketServer, dataprocessor Change-Id: I0690dc2c444fd6fc0db974d1459bf41bd8c31d40 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/websocketprotocol/tst_websocketprotocol.cpp4
-rw-r--r--tests/manual/compliance/tst_compliance.cpp6
2 files changed, 2 insertions, 8 deletions
diff --git a/tests/auto/websocketprotocol/tst_websocketprotocol.cpp b/tests/auto/websocketprotocol/tst_websocketprotocol.cpp
index f088166..8e73921 100644
--- a/tests/auto/websocketprotocol/tst_websocketprotocol.cpp
+++ b/tests/auto/websocketprotocol/tst_websocketprotocol.cpp
@@ -117,10 +117,6 @@ void tst_WebSocketProtocol::tst_validMasks()
//otherwise, the intermediate object is deleted and the data pointer becomes invalid
QByteArray latin1 = inputdata.toLatin1();
char *data = latin1.data();
- //char *data = inputdata.toLatin1().data();
-
- qDebug() << hex << mask;
- qDebug() << QByteArray(data, inputdata.size()).toHex();
QWebSocketProtocol::mask(data, inputdata.size(), mask);
QCOMPARE(QByteArray::fromRawData(data, inputdata.size()), result);
diff --git a/tests/manual/compliance/tst_compliance.cpp b/tests/manual/compliance/tst_compliance.cpp
index 28fb54f..bd4f120 100644
--- a/tests/manual/compliance/tst_compliance.cpp
+++ b/tests/manual/compliance/tst_compliance.cpp
@@ -116,13 +116,13 @@ void tst_ComplianceTest::runTestCase(int nbr, int total)
url.setPath("/runCase?");
QUrlQuery query;
query.addQueryItem("case", QString::number(nbr + 1));
- query.addQueryItem("agent", "QWebSockets/0.9");
+ query.addQueryItem("agent", "QtWebSockets/1.0");
url.setQuery(query);
pWebSocket->open(url);
spy.wait(60000);
pWebSocket->close();
delete pWebSocket;
- pWebSocket = 0;
+ pWebSocket = Q_NULLPTR;
runTestCase(nbr + 1, total);
}
@@ -148,7 +148,6 @@ void tst_ComplianceTest::autobahnTest()
QVERIFY(numberOfTestCases > 0);
QObject::disconnect(pWebSocket, &QWebSocket::textMessageReceived, 0, 0);
-
runTestCases(0, numberOfTestCases);
url.setPath("/updateReports?");
@@ -158,7 +157,6 @@ void tst_ComplianceTest::autobahnTest()
pWebSocket->open(url);
spy.wait(60000);
delete pWebSocket;
- pWebSocket = 0;
}
QTEST_MAIN(tst_ComplianceTest)