diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/debugger/tst_dumpers.cpp | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 3b59a9cce8b..c912f726aad 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -4804,6 +4804,17 @@ void tst_Dumpers::dumper_data() + Check("s3.1.a", "2", "int"); + QTest::newRow("StdBasicString") + << Data("#include <string>\n" + "template<class T>\n" + "class myallocator : public std::allocator<T> {};\n", + "std::basic_string<char, std::char_traits<char>, myallocator<char>> str(\"hello\");\n" + "unused(&str);\n") + + Check("str", "\"hello\"", "std::basic_string<char, std::char_traits<char>, myallocator<char> >") + + Check("str.0", "[0]", "104", "char") // 104: ASCII 'h' + + Check("str.1", "[1]", "101", "char"); // 101: ASCII 'e' + + QTest::newRow("StdString") << Data("#include <string>\n", "std::string str0, str;\n" @@ -4925,7 +4936,9 @@ void tst_Dumpers::dumper_data() QTest::newRow("StdVector") << Data("#include <vector>\n" - "#include <list>\n", + "#include <list>\n" + "template<class T>\n" + "class myallocator : public std::allocator<T> {};\n", "std::vector<double> v0, v1;\n" "v1.push_back(1);\n" @@ -4970,7 +4983,12 @@ void tst_Dumpers::dumper_data() "unused(&b2);\n\n" "std::vector<bool> b3(300);\n" - "unused(&b3);\n") + "unused(&b3);\n" + + "std::vector<bool, myallocator<bool>> b4;\n" + "b4.push_back(true);\n" + "b4.push_back(false);\n" + "unused(&b4);\n") + Check("v0", "<0 items>", "std::vector<double>") + Check("v1", "<3 items>", "std::vector<double>") @@ -5010,8 +5028,11 @@ void tst_Dumpers::dumper_data() + Check("b3", "<300 items>", "std::vector<bool>") + Check("b3.0", "[0]", "0", "bool") - + Check("b3.299", "[299]", "0", "bool"); + + Check("b3.299", "[299]", "0", "bool") + + Check("b4", "<2 items>", "std::vector<bool, myallocator<bool> >") + + Check("b4.0", "[0]", "1", "bool") + + Check("b4.1", "[1]", "0", "bool"); QTest::newRow("StdVectorQt") << Data("#include <vector>\n" + fooData, |