diff options
author | Kurt Pattyn <pattyn.kurt@gmail.com> | 2014-01-19 13:43:52 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-20 20:13:00 +0100 |
commit | f8b27c6b833ee796193ae115cb87574cb0e4df4c (patch) | |
tree | 3196696628cbb08b72c534eac7187fd5d26c102a /tests/manual | |
parent | 02e71a5d8c2a006684e2223084231c07d1fe818f (diff) | |
download | qtwebsockets-f8b27c6b833ee796193ae115cb87574cb0e4df4c.tar.gz |
Rename write methods
Renamed the write methods to sendTextMessage
and sendBinaryMessage respectively. This makes
the code more readable.
Change-Id: Ie49abf07a37f54c84bd01c5c788d2e42b28bcfdd
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/compliance/tst_compliance.cpp | 4 | ||||
-rw-r--r-- | tests/manual/websockets/tst_websockets.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/manual/compliance/tst_compliance.cpp b/tests/manual/compliance/tst_compliance.cpp index 5c2115c..114428b 100644 --- a/tests/manual/compliance/tst_compliance.cpp +++ b/tests/manual/compliance/tst_compliance.cpp @@ -105,10 +105,10 @@ void tst_ComplianceTest::runTestCase(int nbr, int total) //ws://ipaddress:port/runCase?case=<number>&agent=<agentname> //where agent name will be QWebSocket QObject::connect(pWebSocket, &QWebSocket::textMessageReceived, [=](QString message) { - pWebSocket->write(message); + pWebSocket->sendTextMessage(message); }); QObject::connect(pWebSocket, &QWebSocket::binaryMessageReceived, [=](QByteArray message) { - pWebSocket->write(message); + pWebSocket->sendBinaryMessage(message); }); qDebug() << "Executing test" << (nbr + 1) << "/" << total; diff --git a/tests/manual/websockets/tst_websockets.cpp b/tests/manual/websockets/tst_websockets.cpp index 978520d..b4bf4e4 100644 --- a/tests/manual/websockets/tst_websockets.cpp +++ b/tests/manual/websockets/tst_websockets.cpp @@ -134,7 +134,7 @@ void tst_WebSocketsTest::testTextMessage() QSignalSpy spy(m_pWebSocket, SIGNAL(textMessageReceived(QString))); - QCOMPARE(m_pWebSocket->write(message), qint64(message.length())); + QCOMPARE(m_pWebSocket->sendTextMessage(message), qint64(message.length())); QTRY_VERIFY_WITH_TIMEOUT(spy.count() != 0, 1000); QCOMPARE(spy.count(), 1); QCOMPARE(spy.at(0).count(), 1); @@ -147,7 +147,7 @@ void tst_WebSocketsTest::testBinaryMessage() QByteArray data("Hello world!"); - QCOMPARE(m_pWebSocket->write(data), qint64(data.size())); + QCOMPARE(m_pWebSocket->sendBinaryMessage(data), qint64(data.size())); QTRY_VERIFY_WITH_TIMEOUT(spy.count() != 0, 1000); QCOMPARE(spy.count(), 1); |