diff options
author | Kurt Pattyn <pattyn.kurt@gmail.com> | 2013-11-02 21:46:50 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-02 21:49:48 +0100 |
commit | 66cae36228e44f83a0393ab0f6062627760d1d27 (patch) | |
tree | 323b7ca64ea286b732a00ae6d6138869f1d1b5ef /tests/auto/websocketprotocol | |
parent | bbce590694a4980f9c72ec3775a8e9537f72ee84 (diff) | |
download | qtwebsockets-66cae36228e44f83a0393ab0f6062627760d1d27.tar.gz |
Make mask explicitly big endian
Change-Id: I3ed5fa7322ae71d9350f4c1fa835f07117ea125e
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'tests/auto/websocketprotocol')
-rw-r--r-- | tests/auto/websocketprotocol/tst_websocketprotocol.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/websocketprotocol/tst_websocketprotocol.cpp b/tests/auto/websocketprotocol/tst_websocketprotocol.cpp index 1fd62c3..714700e 100644 --- a/tests/auto/websocketprotocol/tst_websocketprotocol.cpp +++ b/tests/auto/websocketprotocol/tst_websocketprotocol.cpp @@ -101,10 +101,13 @@ void tst_WebSocketProtocol::tst_validMasks_data() QTest::addColumn<QString>("inputdata"); QTest::addColumn<QByteArray>("result"); - QTest::newRow("Empty payload") << qToLittleEndian<quint32>(0x12345678u) << QString("") << QByteArray(""); - QTest::newRow("ASCII payload of 8 characters") << qToLittleEndian<quint32>(0x12345678u) << QString("abcdefgh") << QByteArray("\x19\x34\x57\x76\x1D\x30\x53\x7A"); - QTest::newRow("ASCII payload of 9 characters") << qToLittleEndian<quint32>(0x12345678u) << QString("abcdefghi") << QByteArray("\x19\x34\x57\x76\x1D\x30\x53\x7A\x11"); - QTest::newRow("UTF-8 payload") << qToLittleEndian<quint32>(0x12345678u) << QString("∫∂ƒ©øØ") << QByteArray("\x47\x69\x0B\xBB\x80\x8E"); + QTest::newRow("Empty payload") << qToBigEndian<quint32>(0x12345678u) << QString("") << QByteArray(""); +// QTest::newRow("ASCII payload of 8 characters") << qToBigEndian<quint32>(0x12345678u) << QString("abcdefgh") << QByteArray("\x19\x34\x57\x76\x1D\x30\x53\x7A"); +// QTest::newRow("ASCII payload of 9 characters") << qToBigEndian<quint32>(0x12345678u) << QString("abcdefghi") << QByteArray("\x19\x34\x57\x76\x1D\x30\x53\x7A\x11"); +// QTest::newRow("UTF-8 payload") << qToBigEndian<quint32>(0x12345678u) << QString("∫∂ƒ©øØ") << QByteArray("\x47\x69\x0B\xBB\x80\x8E"); + QTest::newRow("ASCII payload of 8 characters") << qToBigEndian<quint32>(0x12345678u) << QString("abcdefgh") << QByteArray("\x73\x56\x35\x1C\x77\x52\x31\x10"); + QTest::newRow("ASCII payload of 9 characters") << qToBigEndian<quint32>(0x12345678u) << QString("abcdefghi") << QByteArray("\x73\x56\x35\x1C\x77\x52\x31\x10\x7B"); + QTest::newRow("UTF-8 payload") << qToBigEndian<quint32>(0x12345678u) << QString("∫∂ƒ©øØ") << QByteArray("\x2D\x0B\x69\xD1\xEA\xEC"); } void tst_WebSocketProtocol::tst_validMasks() |