summaryrefslogtreecommitdiff
path: root/tests/auto/debugger/tst_dumpers.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2017-02-12 00:06:02 +0200
committerOrgad Shaneh <orgads@gmail.com>2017-02-13 07:08:48 +0000
commit9c820101cce0db82aedf2fe3ecb7bffc95679b68 (patch)
treec588f3e061851e0a67cd47326d60b4b1dfb9570a /tests/auto/debugger/tst_dumpers.cpp
parent22f5f94ba33dc0cdc6cb54b1fc63f4f567bbf70b (diff)
downloadqt-creator-9c820101cce0db82aedf2fe3ecb7bffc95679b68.tar.gz
Debugger: Fix dumper tests
1f29242276b83489b6671e0190cedc295e1360b9 used the correct form for CONFIG -= qt. This revealed several cases that are missing CoreProfile configuration. Change-Id: I8bb6d5156eb6beba91a8df7b948832f1e043d64f Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'tests/auto/debugger/tst_dumpers.cpp')
-rw-r--r--tests/auto/debugger/tst_dumpers.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp
index 98d9211506..eb11875f83 100644
--- a/tests/auto/debugger/tst_dumpers.cpp
+++ b/tests/auto/debugger/tst_dumpers.cpp
@@ -869,6 +869,7 @@ public:
const Data &operator+(const QmlProfile &) const
{
+ this->operator+(CoreProfile());
profileExtra +=
"greaterThan(QT_MAJOR_VERSION, 4) {\n"
" QT += qml\n"
@@ -3005,6 +3006,7 @@ void tst_Dumpers::dumper_data()
"SomeStructPointer p(s); unused(p);\n"
"Pointer<SomeStruct> pp(s); unused(pp);\n"
"QAtomicPointer<SomeStruct> ppp(s); unused(ppp);\n")
+ + CoreProfile()
+ Cxx11Profile()
+ Check("p.@1.a", "1", "int")
+ Check("p.@1.e", "<2 items>", "@QList<@QString>")
@@ -4230,6 +4232,7 @@ void tst_Dumpers::dumper_data()
"l2.push_back(new Foo(2));\n"
"unused(&l2);\n")
+ + CoreProfile()
+ Check("l1", "<2 items>", "std::list<Foo>")
+ Check("l1.0", "[0]", "", "Foo")
+ Check("l1.0.a", "15", "int")
@@ -4428,6 +4431,7 @@ void tst_Dumpers::dumper_data()
"std::unique_ptr<Foo> p2(new Foo); unused(&p2);\n\n"
"std::unique_ptr<std::string> p3(new std::string(\"ABC\")); unused(&p3);\n\n")
+ + CoreProfile()
+ Cxx11Profile()
+ MacLibCppProfile()
@@ -4455,6 +4459,7 @@ void tst_Dumpers::dumper_data()
"std::weak_ptr<Foo> wf = pf; unused(&wf);\n"
"std::weak_ptr<std::string> ws = ps; unused(&ws);\n")
+ + CoreProfile()
+ Cxx11Profile()
+ MacLibCppProfile()
@@ -4546,6 +4551,7 @@ void tst_Dumpers::dumper_data()
"unused(&ptr, &ob, &set1, &set2);\n")
+ + CoreProfile()
+ Check("set1", "<1 items>", "std::set<@QString>")
+ Check("set1.0", "[0]", "\"22.0\"", "@QString")
@@ -5092,6 +5098,7 @@ void tst_Dumpers::dumper_data()
"quint8 qu = -12;\n"
"unused(&c, &sc, &uc, &qs, &qu);\n")
+ + CoreProfile()
+ Check("c", "-12", "char") // on all our platforms char is signed.
+ Check("sc", "-12", TypeDef("char", "signed char"))
+ Check("uc", "244", "unsigned char")
@@ -5237,6 +5244,7 @@ void tst_Dumpers::dumper_data()
"for (int i = 0; i < 5; ++i)\n"
" a3[i].a = i;\n")
+ + CoreProfile()
+ CheckType("a1", "@QString [20]")
+ Check("a1.0", "[0]", "\"a\"", "@QString")
+ Check("a1.3", "[3]", "\"d\"", "@QString")
@@ -5364,6 +5372,7 @@ void tst_Dumpers::dumper_data()
"Foo *p = new Foo();\n"
"unused(&p);\n")
+ + CoreProfile()
+ Check("f", "", "Foo")
+ Check("f.a", "3", "int")
+ Check("f.b", "2", "int")
@@ -5569,6 +5578,7 @@ void tst_Dumpers::dumper_data()
"}\n",
"Foo f(12);\n"
"testPassByReference(f);\n")
+ + CoreProfile()
+ NoCdbEngine // The Cdb has no information about references
+ CheckType("f", "Foo &")
+ Check("f.a", "12", "int");
@@ -5699,6 +5709,7 @@ void tst_Dumpers::dumper_data()
"boost::shared_ptr<QStringList> sl(new QStringList(QStringList() << \"HUH!\"));\n"
"unused(&s, &i, &j, &sl);\n")
+ + CoreProfile()
+ BoostProfile()
+ Check("s", "(null)", "boost::shared_ptr<int>")
@@ -6417,6 +6428,7 @@ void tst_Dumpers::dumper_data()
"unused(&ob,&b,&a);\n"
"#endif\n")
+ Cxx11Profile()
+ + CoreProfile()
+ QtVersion(0x50000)
+ Check("a", "<6 items>", "@QJsonArray")
+ Check("a.0", "[0]", "1", "QJsonValue (Number)")
@@ -6461,9 +6473,9 @@ void tst_Dumpers::dumper_data()
QTest::newRow("QV4")
<< Data("#include <private/qv4value_p.h>\n"
"#include <private/qjsvalue_p.h>\n"
- "#include <QGuiApplication>\n"
+ "#include <QCoreApplication>\n"
"#include <QJSEngine>\n",
- "QGuiApplication app(argc, argv);\n"
+ "QCoreApplication app(argc, argv);\n"
"QJSEngine eng;\n\n"
"//QV4::Value q0; unused(&q0); // Uninitialized data.\n\n"
"//QV4::Value q1; unused(&q1); // Upper 32 bit uninitialized.\n"