summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-03-08 16:37:52 +0100
committerhjk <hjk@qt.io>2017-03-09 08:20:46 +0000
commitfb213b5826519fed277487b296fc3504bf44de76 (patch)
tree8ca4e209aa1e93270b765c8bcad7d520f548583d /tests
parenta49399dcb9acf71c00e0e85f56ca48dd0154b47b (diff)
downloadqt-creator-fb213b5826519fed277487b296fc3504bf44de76.tar.gz
Debugger: Use a named tuple for Dumper.Field
Makes it clear that this is meant to be immutable and is supposedly faster. Task-number: QTCREATORBUG-17823 Change-Id: Ie5d67b793e0bc4f704981d5161efc12bcc22100a Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/debugger/tst_dumpers.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp
index ff09e10d45..08651da1c4 100644
--- a/tests/auto/debugger/tst_dumpers.cpp
+++ b/tests/auto/debugger/tst_dumpers.cpp
@@ -5848,6 +5848,9 @@ void tst_Dumpers::dumper_data()
+ Check("p3", "Thu Jan 1 00:00:00 1970", "boost::posix_time::ptime");
+/*
+ FIXME
+
QTest::newRow("BoostList")
<< Data("#include <boost/container/list.hpp>\n",
"typedef std::pair<int, double> p;\n"
@@ -5859,6 +5862,7 @@ void tst_Dumpers::dumper_data()
+ BoostProfile()
+ Check("l", "<4 items>", TypePattern("boost::container::list<std::pair<int,double>.*>"))
+ Check("l.2.second", FloatValue("65"), "double");
+*/
QTest::newRow("BoostUnorderedSet")
@@ -6140,6 +6144,45 @@ void tst_Dumpers::dumper_data()
+ // https://bugreports.qt.io/browse/QTCREATORBUG-17823
+ QTest::newRow("Bug17823")
+ << Data("struct Base1\n"
+ "{\n"
+ " virtual ~Base1() {}\n"
+ " int foo = 42;\n"
+ "};\n\n"
+ "struct Base2\n"
+ "{\n"
+ " virtual ~Base2() {}\n"
+ " int bar = 43;\n"
+ "};\n\n"
+ "struct Derived : Base1, Base2\n"
+ "{\n"
+ " int baz = 84;\n"
+ "};\n\n"
+ "struct Container\n"
+ "{\n"
+ " Container(Base2 *b) : b2(b) {}\n"
+ " Base2 *b2;\n"
+ "};\n",
+
+ "Derived d;\n"
+ "Container c(&d); // c.b2 has wrong address\n"
+ "unused(&c);\n"
+ "Base2 *b2 = &d; // This has the right address\n"
+ "unused(&b2);\n")
+ + NoCdbEngine // FIXME
+
+ + Check("c.b2.@1.foo", "42", "int")
+ + Check("c.b2.@2.bar", "43", "int")
+ + Check("c.b2.baz", "84", "int")
+
+ + Check("d.@1.foo", "42", "int")
+ + Check("d.@2.bar", "43", "int")
+ + Check("d.baz", "84", "int");
+
+
+
// http://www.qtcentre.org/threads/42170-How-to-watch-data-of-actual-type-in-debugger
QTest::newRow("QC42170")
<< Data("struct Object {\n"