Commit a125e54b authored by hjk's avatar hjk
Browse files

add a basic autotest for QVariant dumper

parent e41adfe6
......@@ -116,6 +116,7 @@ private slots:
void dumpQHash();
void dumpQObject();
void dumpQString();
void dumpQVariant();
void dumpStdVector();
public slots:
......@@ -454,6 +455,25 @@ void tst_Debugger::dumpQString()
&s, NS"QString", false);
}
void tst_Debugger::dumpQVariant()
{
QVariant v;
testDumper("value='(invalid)',type='$T',numchild='0'",
&v, NS"QVariant", false);
v = "abc";
testDumper("value='KFFTdHJpbmcpICJhYmMi',valueencoded='5',type='$T',"
"numchild='1',children=[{name='value',value='IgBhAGIAYwAiAA==',"
"valueencoded='4',type='QString',numchild='0'}]",
&v, NS"QVariant", true);
v = QStringList() << "Hi";
return; // FIXME
testDumper("value='(QStringList) ',type='$T',"
"numchild='1',children=[{name='value',"
"exp='(*('myns::QStringList'*)3215364300)',"
"type='QStringList',numchild='1'}]",
&v, NS"QVariant", true);
}
void tst_Debugger::dumpStdVector()
{
std::vector<std::list<int> *> vector;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment