diff options
author | Dmitry Nuzhdin <dmtr.nuzhdin@gmail.com> | 2019-08-24 10:48:17 +0300 |
---|---|---|
committer | Dmitry Nuzhdin <dmtr.nuzhdin@gmail.com> | 2019-08-26 16:11:23 +0000 |
commit | 309e345818063507ed5bcd8151d670ebd43b6b9c (patch) | |
tree | 6e1c4726bbd819367388447d7cf1d611bd56cf98 /tests/auto | |
parent | 8751d0c7d983a97ec2f0c557dde13b0c7592ea13 (diff) |
Debugger: Fix mapping std::set in Locals window via gdb
Currently QtCreator incorrectly shows content of a std::set.
For example set {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
is shown as {0, 1, 2, 1, 2, 1, 2, 1, 2}.
Change-Id: Idaff66451827657ef129aa3d27895c43938e6fdc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/debugger/tst_dumpers.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index b179882643..026846e7db 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -4692,10 +4692,7 @@ void tst_Dumpers::dumper_data() "std::set<double> s0;\n" "unused(&s0);\n\n" - "std::set<int> s1;\n" - "s1.insert(11);\n" - "s1.insert(22);\n" - "s1.insert(33);\n" + "std::set<int> s1{11, 22, 33, 44, 55, 66, 77, 88};\n" "unused(&s1);\n\n" "typedef std::set<int> Set;\n" @@ -4716,9 +4713,13 @@ void tst_Dumpers::dumper_data() "s3.insert(3);\n" "s3.insert(3);\n") + + Cxx11Profile() + Check("s0", "<0 items>", "std::set<double>") - + Check("s1", "<3 items>", "std::set<int>") + + Check("s1", "<8 items>", "std::set<int>") + + Check("s1.0", "[0]", "11", "int") + + Check("s1.1", "[1]", "22", "int") + + Check("s1.5", "[5]", "66", "int") + Check("s2", "<3 items>", TypeDef("std::set<int>", "Set")) + Check("it1.value", "11", "int") |