diff options
author | Kurt Pattyn <pattyn.kurt@gmail.com> | 2013-11-03 21:25:16 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-03 21:40:22 +0100 |
commit | 017405f210bd46d15cdfce2dace674cab6260402 (patch) | |
tree | a75adefda10358645f13bc06fcca7d12166c0306 | |
parent | 1edbe386cd8f84ace940eac2bdab84152ab2060f (diff) | |
download | qtwebsockets-017405f210bd46d15cdfce2dace674cab6260402.tar.gz |
Put fixed string length in test data
Change-Id: I01e24b17656278c77de431c5df49d2bbd996ee89
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
-rw-r--r-- | tests/auto/dataprocessor/tst_dataprocessor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/dataprocessor/tst_dataprocessor.cpp b/tests/auto/dataprocessor/tst_dataprocessor.cpp index 7c025b9..dacc470 100644 --- a/tests/auto/dataprocessor/tst_dataprocessor.cpp +++ b/tests/auto/dataprocessor/tst_dataprocessor.cpp @@ -305,8 +305,10 @@ void tst_DataProcessor::goodTextFrame_data() } //UC 6.2 - //QTest::newRow(QStringLiteral("Text frame containing Hello-µ@ßöäüàá-UTF-8!!").toStdString().data()) << QByteArray::fromHex("48656c6c6f2dc2b540c39fc3b6c3a4c3bcc3a0c3a12d5554462d382121") << QStringLiteral("Hello-µ@ßöäüàá-UTF-8!!").size(); - QTest::newRow(QStringLiteral("Text frame containing Hello-µ@ßöäüàá-UTF-8!!").toStdString().data()) << QByteArray::fromHex("48656c6c6f2dc2b540c39fc3b6c3a4c3bcc3a0c3a12d5554462d382121") << QStringLiteral("Hello-\xC2\xB5\x40\xC3\x9F\xC3\xB6\xC3\xA4\xC3\xBC\xC3\xA0\xC3\xA1-UTF-8!!").size(); + //the text string reads: Text frame containing Hello-µ@ßöäüàá-UTF-8!! + //Visual Studio doesn't like UTF-8 in source code, so we use escape codes for the string + //The number 22 refers to the length of the string; the length was incorrectly calculated on Visual Studio + QTest::newRow(QStringLiteral("Text frame containing Hello-\xC2\xB5\x40\xC3\x9F\xC3\xB6\xC3\xA4\xC3\xBC\xC3\xA0\xC3\xA1-UTF-8!!").toStdString().data()) << QByteArray::fromHex("48656c6c6f2dc2b540c39fc3b6c3a4c3bcc3a0c3a12d5554462d382121") << 22; } void tst_DataProcessor::goodTextFrame() |