aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/debugger/tst_dumpers.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-11-09 12:36:47 +0100
committerhjk <hjk@qt.io>2017-11-10 11:36:55 +0000
commit0965b9752dda468c9193d6eb93528e4f5988e8ec (patch)
tree9b1e54a74b88b9ed204054f28e0568e13384b3b7 /tests/auto/debugger/tst_dumpers.cpp
parent7194500d57337476984e4ac1800fd999286d866b (diff)
Debugger: Add one more enum dumper autotest
I cannot reproduce the issue from the bug report anymore, but having a test for it should not hurt. Task-number: QTCREATORBUG-18529 Change-Id: If7464e45c14bbe316bf7ed1c68ea1f2692093005 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests/auto/debugger/tst_dumpers.cpp')
-rw-r--r--tests/auto/debugger/tst_dumpers.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp
index 4e6828a263..aa1d1aaee6 100644
--- a/tests/auto/debugger/tst_dumpers.cpp
+++ b/tests/auto/debugger/tst_dumpers.cpp
@@ -5336,6 +5336,22 @@ void tst_Dumpers::dumper_data()
+ Check("fbad", "(unknown:24) (24)", "Flags");
+ QTest::newRow("EnumInClass")
+ << Data("struct E {\n"
+ " enum Enum1 { a1, b1, c1 };\n"
+ " typedef enum Enum2 { a2, b2, c2 } Enum2;\n"
+ " typedef enum { a3, b3, c3 } Enum3;\n"
+ " Enum1 e1 = Enum1(c1 | b1);\n"
+ " Enum2 e2 = Enum2(c2 | b2);\n"
+ " Enum3 e3 = Enum3(c3 | b3);\n"
+ "};\n",
+ "E e;\n")
+ + GdbEngine
+ + Check("e.e1", "E::b1 | E::c1 (0x0003)", "E::Enum1")
+ + Check("e.e2", "E::b2 | E::c2 (0x0003)", "E::Enum2")
+ + Check("e.e3", "E::b3 | E::c3 (0x0003)", "E::Enum3");
+
+
QTest::newRow("Array")
<< Data("",
"double a1[3][3];\n"