aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2012-03-14 19:28:36 +0100
committerhjk <qthjk@ovi.com>2012-04-18 15:56:55 +0200
commita7a3941cc286366431f64df4a786f24dd8940208 (patch)
tree6b46365e0fdd39ae3375b4d8169908362f2da0a7 /tests
parent492b1ccc531b5099f9f537596a859fd7eff262ea (diff)
debugger: Fix QString, QVector, QByteArray dumper for Qt 5 container changes.
Change-Id: Ib966adda453cbc8e44c36ae629f62ac3a5bf5bf7 Reviewed-by: Christian Stenger <christian.stenger@nokia.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/debugger/simple/simple_test_app.cpp32
1 files changed, 29 insertions, 3 deletions
diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp
index c3af74b1ba..2ef4dda39c 100644
--- a/tests/manual/debugger/simple/simple_test_app.cpp
+++ b/tests/manual/debugger/simple/simple_test_app.cpp
@@ -582,11 +582,24 @@ namespace qbytearray {
dummyStatement(&buf1, &buf2, &buf3);
}
+ void testQByteArray4()
+ {
+ char data[] = { 'H', 'e', 'l', 'l', 'o' };
+ QByteArray ba1 = QByteArray::fromRawData(data, 4);
+ QByteArray ba2 = QByteArray::fromRawData(data + 1, 4);
+ BREAK_HERE;
+ // Check ba1 "Hell" QByteArray.
+ // Check ba2 "ello" QByteArray.
+ // Continue.
+ dummyStatement(&ba1, &ba2, &data);
+ }
+
void testQByteArray()
{
testQByteArray1();
testQByteArray2();
testQByteArray3();
+ testQByteArray4();
}
} // namespace qbytearray
@@ -3370,14 +3383,26 @@ namespace qstring {
str += QLatin1Char(0);
str += QLatin1Char(1);
str += " fat ";
- str += " World ";
- str += " World ";
+ str += " World";
+ str.prepend("Prefix: ");
BREAK_HERE;
- // Check str "Hello big, \t\r\n\000\001 fat World World " QString.
+ // Check str "Prefix: Hello big, \t\r\n\000\001 fat World" QString.
// Continue.
dummyStatement(&str);
}
+ void testQString2()
+ {
+ QChar data[] = { 'H', 'e', 'l', 'l', 'o' };
+ QString str1 = QString::fromRawData(data, 4);
+ QString str2 = QString::fromRawData(data + 1, 4);
+ BREAK_HERE;
+ // Check str1 "Hell" QString.
+ // Check str2 "ello" QString.
+ // Continue.
+ dummyStatement(&str1, &str2, &data);
+ }
+
void stringRefTest(const QString &refstring)
{
dummyStatement(&refstring);
@@ -3408,6 +3433,7 @@ namespace qstring {
void testQString()
{
testQString1();
+ testQString2();
testQString3();
testQStringQuotes();
}