Tests: Adapt QVariant dumper test

Disable QVariant holding a typedef'ed QMap for
now (insignificant).
Adapt expectations for QVariant holding a QList.

Change-Id: I188e01b2d53d17057207db06e9e848a5bfb3adb2
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2022-08-23 15:42:39 +02:00
parent 20400b263e
commit 79949d9ae8

View File

@@ -4070,23 +4070,28 @@ void tst_Dumpers::dumper_data()
+ CheckPairish("my.1.key", "3", "unsigned int") + CheckPairish("my.1.key", "3", "unsigned int")
+ CheckPairish("my.1.value", "<1 items>", TypePattern("@QList<@QString>|@QStringList")) + CheckPairish("my.1.value", "<1 items>", TypePattern("@QList<@QString>|@QStringList"))
+ CheckPairish("my.1.value.0", "[0]", "\"World\"", "@QString") + CheckPairish("my.1.value.0", "[0]", "\"World\"", "@QString")
// FIXME
//+ Check("v2", AnyValue, "@QVariant (MyType)") //+ Check("v2", AnyValue, "@QVariant (MyType)")
+ CheckPairish("v2.data.0.key", "1", "unsigned int") % NeedsInferiorCall // + CheckPairish("v2.data.0.key", "1", "unsigned int") % NeedsInferiorCall
+ CheckPairish("v2.data.0.value", "<1 items>", "@QStringList") % NeedsInferiorCall // + CheckPairish("v2.data.0.value", "<1 items>", "@QStringList") % NeedsInferiorCall
+ CheckPairish("v2.data.0.value.0", "[0]", "\"Hello\"", "@QString") % NeedsInferiorCall // + CheckPairish("v2.data.0.value.0", "[0]", "\"Hello\"", "@QString") % NeedsInferiorCall
+ CheckPairish("v2.data.1.key", "3", "unsigned int") % NeedsInferiorCall // + CheckPairish("v2.data.1.key", "3", "unsigned int") % NeedsInferiorCall
+ CheckPairish("v2.data.1.value", "<1 items>", "@QStringList") % NeedsInferiorCall // + CheckPairish("v2.data.1.value", "<1 items>", "@QStringList") % NeedsInferiorCall
+ CheckPairish("v2.data.1.value.0", "[0]", "\"World\"", "@QString") % NeedsInferiorCall // + CheckPairish("v2.data.1.value.0", "[0]", "\"World\"", "@QString") % NeedsInferiorCall
+ Check("list", "<3 items>", "@QList<int>") + Check("list", "<3 items>", "@QList<int>")
+ Check("list.0", "[0]", "1", "int") + Check("list.0", "[0]", "1", "int")
+ Check("list.1", "[1]", "2", "int") + Check("list.1", "[1]", "2", "int")
+ Check("list.2", "[2]", "3", "int") + Check("list.2", "[2]", "3", "int")
//+ Check("v3", "", "@QVariant (@QList<int>)") + Check("v3", "", "@QVariant (@QList<int>)") % Qt5
+ Check("v3.data", "<3 items>", TypePattern(".*QList<int>")) % NeedsInferiorCall + Check("v3.data", "<3 items>", TypePattern(".*QList<int>")) % NeedsInferiorCall % Qt5
+ Check("v3.data.0", "[0]", "1", "int") % NeedsInferiorCall + Check("v3.data.0", "[0]", "1", "int") % NeedsInferiorCall % Qt5
+ Check("v3.data.1", "[1]", "2", "int") % NeedsInferiorCall + Check("v3.data.1", "[1]", "2", "int") % NeedsInferiorCall % Qt5
+ Check("v3.data.2", "[2]", "3", "int") % NeedsInferiorCall; + Check("v3.data.2", "[2]", "3", "int") % NeedsInferiorCall % Qt5
+ Check("v3", "<3 items>", "@QVariant (@QList<int>)") % Qt6
+ Check("v3.0", "[0]", "1", "int") % NeedsInferiorCall % Qt6
+ Check("v3.1", "[1]", "2", "int") % NeedsInferiorCall % Qt6
+ Check("v3.2", "[2]", "3", "int") % NeedsInferiorCall % Qt6;
QTest::newRow("QVariant2") QTest::newRow("QVariant2")