MCPcopy Create free account
hub / github.com/KDE/kdevelop / testQString

Method testQString

plugins/gdb/unittests/test_gdbprinters.cpp:142–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void QtPrintersTest::testQString()
143{
144 GdbProcess gdb(QStringLiteral("debuggee_qstring"));
145 gdb.execute("break qstring.cpp:5");
146 gdb.execute("run");
147
148 QCOMPARE(printedValue(gdb, "s"), "\"test最后一个不是特殊字符'\\\"\\\\u6211\"");
149 gdb.execute("next");
150 QCOMPARE(printedValue(gdb, "s"), "\"test最后一个不是特殊字符'\\\"\\\\u6211x\"");
151 gdb.execute("next");
152 QCOMPARE(printedValue(gdb, "view"), "\"test最后一个不是特殊字符'\\\"\\\\u6211x\"");
153 gdb.execute("next");
154 QCOMPARE(printedValue(gdb, "view"), "\"test最\"");
155 gdb.execute("next");
156 QCOMPARE(printedValue(gdb, "latin1String"), "\"abcé\"");
157 gdb.execute("next");
158 QCOMPARE(printedValue(gdb, "utf8StringView"), "\"test最后\"");
159
160 gdb.execute("break qstring.cpp:16");
161 gdb.execute("continue");
162 constexpr const char* emptyString = "\"\"";
163 QCOMPARE(printedValue(gdb, "nullString"), emptyString);
164 QCOMPARE(printedValue(gdb, "emptyString"), emptyString);
165 QCOMPARE(printedValue(gdb, "emptyView"), emptyString);
166 QCOMPARE(printedValue(gdb, "emptyLatin1String"), emptyString);
167 QCOMPARE(printedValue(gdb, "emptyUtf8StringView"), emptyString);
168}
169
170void QtPrintersTest::testQByteArray()
171{

Callers

nothing calls this directly

Calls 2

printedValueFunction · 0.85
executeMethod · 0.45

Tested by

no test coverage detected