| 140 | } |
| 141 | |
| 142 | void 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 | |
| 170 | void QtPrintersTest::testQByteArray() |
| 171 | { |
nothing calls this directly
no test coverage detected