From 9c820101cce0db82aedf2fe3ecb7bffc95679b68 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 12 Feb 2017 00:06:02 +0200 Subject: 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 --- tests/auto/debugger/tst_dumpers.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'tests') 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 pp(s); unused(pp);\n" "QAtomicPointer 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") + Check("l1.0", "[0]", "", "Foo") + Check("l1.0.a", "15", "int") @@ -4428,6 +4431,7 @@ void tst_Dumpers::dumper_data() "std::unique_ptr p2(new Foo); unused(&p2);\n\n" "std::unique_ptr p3(new std::string(\"ABC\")); unused(&p3);\n\n") + + CoreProfile() + Cxx11Profile() + MacLibCppProfile() @@ -4455,6 +4459,7 @@ void tst_Dumpers::dumper_data() "std::weak_ptr wf = pf; unused(&wf);\n" "std::weak_ptr 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 sl(new QStringList(QStringList() << \"HUH!\"));\n" "unused(&s, &i, &j, &sl);\n") + + CoreProfile() + BoostProfile() + Check("s", "(null)", "boost::shared_ptr") @@ -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 \n" "#include \n" - "#include \n" + "#include \n" "#include \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" -- cgit v1.2.1