diff options
author | hjk <hjk@qt.io> | 2017-06-16 18:12:07 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2017-06-19 09:24:38 +0000 |
commit | b129cebccc0da9afc4aba34e48973eaaadd5c772 (patch) | |
tree | 5e620fdf55eac32976ed0e7ded00109e461374e9 /tests/auto/debugger/tst_dumpers.cpp | |
parent | 2897414d3b112864b1cb133361aa22111bdb51c2 (diff) | |
download | qt-creator-b129cebccc0da9afc4aba34e48973eaaadd5c772.tar.gz |
Debugger: Fix manual splitting of complex template parameter types
Parsing has to stop at the first < (coming from the end).
foo::span<int>::bar<double> has a parameter 'double', not 'intdouble'.
Change-Id: Ied142d5e75a7587d6c0efd3b51608b199b999e93
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'tests/auto/debugger/tst_dumpers.cpp')
-rw-r--r-- | tests/auto/debugger/tst_dumpers.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index f2140bda26..6fe3d99bdd 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -6790,6 +6790,36 @@ void tst_Dumpers::dumper_data() + Check("tc.3.bar", "15", "int"); + QTest::newRow("Internal3") + << Data("namespace details\n" + "{\n" + " template <int> struct extent_type;\n" + " template <> struct extent_type<-1> { int size_; };\n" + "}\n" + "\n" + "template <class T, int Extent>\n" + "struct Span\n" + "{\n" + " Span(T *firstElem, int n) : storage_(firstElem, n) {}\n" + "\n" + " template <class ExtentType>\n" + " struct Storage : public ExtentType\n" + " {\n" + " template <class OtherExtentType>\n" + " Storage(T *data, OtherExtentType ext)\n" + " : ExtentType{ext}, data_(data)\n" + " {}\n" + "\n" + " T *data_;\n" + " };\n" + "\n" + " Storage<details::extent_type<Extent>> storage_;\n" + "};\n", + "int v[4] = { 1, 2, 4, 8 }; \n" + "Span<int, -1> s(v, 4); unused(&s); \n") + + Check("s.storage_.@1.size_", "4", "int"); + + QTest::newRow("BufArray") << Data("#include <new>\n" "static int c = 0;\n" |