Commit 99efc428 authored by Igor Kushnir's avatar Igor Kushnir Committed by Milian Wolff
Browse files

GDB printers: Add null/empty QString tests

parent 990dc7fa
Pipeline #192573 failed with stage
in 15 minutes and 1 second
......@@ -3,5 +3,7 @@ int main()
{
QString s = QString::fromUtf8("test最后一个不是特殊字符'\"\\u6211");
s.append("x");
QString nullString;
const auto emptyString = QString::fromUtf8("");
return 0;
}
......@@ -106,6 +106,12 @@ void QtPrintersTest::testQString()
QVERIFY(gdb.execute("print s").contains("\"test最后一个不是特殊字符'\\\"\\\\u6211\""));
gdb.execute("next");
QVERIFY(gdb.execute("print s").contains("\"test最后一个不是特殊字符'\\\"\\\\u6211x\""));
const auto isEmptyGdbString = [](const QString& str) { return str.contains("= \"\""); };
gdb.execute("next");
QVERIFY(isEmptyGdbString(gdb.execute("print nullString")));
gdb.execute("next");
QVERIFY(isEmptyGdbString(gdb.execute("print emptyString")));
}
void QtPrintersTest::testQByteArray()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment