diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2017-02-11 23:45:33 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2017-02-13 08:08:41 +0000 |
commit | 0c9f23db96f53420d42d01ae8f8d6b549dce7587 (patch) | |
tree | 9b0e231c934c802023bb62b0f65bb9eb07f1386c /tests/auto/debugger/tst_dumpers.cpp | |
parent | eb4b4d7be2259b060d54eeaaf0944cfab1239e0a (diff) | |
download | qt-creator-0c9f23db96f53420d42d01ae8f8d6b549dce7587.tar.gz |
GDB: Fix printing of flag enums
It worked with plain GDB (parse_and_eval), and was broken by
696b2d426163450a2a554624b2121e07281a76d7.
Change-Id: Ibc143efdbd90681a2f9f4d84b75063eb98078f2b
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.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index c2534e91e5..68822dbc09 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -5094,6 +5094,20 @@ void tst_Dumpers::dumper_data() + Check("fd", "d (2)", "Foo"); + QTest::newRow("EnumFlags") + << Data("\n" + "enum Flags { one = 1, two = 2, four = 4 };\n", + "Flags fone = one; unused(&fone);\n" + "Flags fthree = (Flags)(one|two); unused(&fthree);\n" + "Flags fmixed = (Flags)(two|8); unused(&fmixed);\n" + "Flags fbad = (Flags)(24); unused(&fbad);\n") + + GdbEngine + + Check("fone", "one (1)", "Flags") + + Check("fthree", "(one | two) (3)", "Flags") + + Check("fmixed", "(two | unknown:8) (10)", "Flags") + + Check("fbad", "(unknown:24) (24)", "Flags"); + + QTest::newRow("Array") << Data("double a1[3][3];\n" "for (int i = 0; i != 3; ++i)\n" |