Debugging helpers: support for boost::small_vector

Change-Id: Ided74fa2ebf3e4ae5258e22064bb105bd45710ac
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ihor Dutchak <ihor.youw@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jean-Michaël Celerier
2022-01-16 18:00:07 +01:00
parent d8e2a3fd45
commit e0f539a068
2 changed files with 31 additions and 0 deletions

View File

@@ -116,6 +116,14 @@ def qdump__boost__container__static_vector(d, value):
qdump__boost__container__vector(d, value)
def qform__boost__container__small_vector():
return [DisplayFormat.ArrayPlot]
def qdump__boost__container__small_vector(d, value):
qdump__boost__container__vector(d, value)
def qdump__boost__gregorian__date(d, value):
d.putValue(value.integer(), "juliandate")

View File

@@ -6752,6 +6752,29 @@ void tst_Dumpers::dumper_data()
+ Check("v.2.second", FloatValue("65"), "double");
QTest::newRow("BoostSmallVector")
<< Data("#include <boost/container/small_vector.hpp>\n",
"typedef std::pair<int, double> p;\n"
"boost::container::small_vector<p, 3> v0;\n"
"boost::container::small_vector<p, 3> v2;\n"
"v2.push_back(p(13, 61));\n"
"v2.push_back(p(14, 64));\n"
"boost::container::small_vector<p, 3> v4;\n"
"v4.push_back(p(13, 61));\n"
"v4.push_back(p(14, 64));\n"
"v4.push_back(p(15, 65));\n"
"v4.push_back(p(16, 66));\n",
"&v0, &v2, &v4")
+ BoostProfile()
+ Check("v0", "<0 items>", TypePattern("boost::container::small_vector<std::pair<int,double>.*>"))
+ Check("v2", "<2 items>", TypePattern("boost::container::small_vector<std::pair<int,double>.*>"))
+ Check("v2.0.first", "13", "int")
+ Check("v2.1.second", FloatValue("64"), "double")
+ Check("v4", "<4 items>", TypePattern("boost::container::small_vector<std::pair<int,double>.*>"))
+ Check("v4.1.first", "14", "int")
+ Check("v4.3.second", FloatValue("66"), "double");
QTest::newRow("BoostUnorderedSet")
<< Data("#include <boost/unordered_set.hpp>\n"
"#include <boost/version.hpp>\n"