aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlinstruction
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-05-10 09:26:35 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-14 03:03:45 +0200
commitd3ec26ea2e22d350a1adc58fbc6903a32c9dea3a (patch)
tree349d8f5b575503bd954c54d85595c334e5f91bb8 /tests/auto/qml/qqmlinstruction
parent91bac7643928dcc1a0967abd30559b2c84b58025 (diff)
Handle Var instructions in instruction dumper
They would show up as "XXX UNKNOWN INSTRUCTION" in instruction dumps. Change-Id: I3bebfe7519ddfb75c413a067ef05867cc07cd71b Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlinstruction')
-rw-r--r--tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp b/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp
index 18b3653607..5fe15a64fe 100644
--- a/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp
+++ b/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp
@@ -467,6 +467,42 @@ void tst_qqmlinstruction::dump()
data->addInstruction(i);
}
+ {
+ data->primitives << "color(1, 1, 1, 1)";
+ QQmlCompiledData::Instruction::StoreVar i;
+ i.propertyIndex = 79;
+ i.value = data->primitives.count() - 1;
+
+ data->addInstruction(i);
+ }
+
+ {
+ QQmlCompiledData::Instruction::StoreVarObject i;
+ i.propertyIndex = 80;
+ data->addInstruction(i);
+ }
+
+ {
+ QQmlCompiledData::Instruction::StoreVarInteger i;
+ i.value = 23;
+ i.propertyIndex = 81;
+ data->addInstruction(i);
+ }
+
+ {
+ QQmlCompiledData::Instruction::StoreVarDouble i;
+ i.value = 66.3;
+ i.propertyIndex = 82;
+ data->addInstruction(i);
+ }
+
+ {
+ QQmlCompiledData::Instruction::StoreVarBool i;
+ i.value = true;
+ i.propertyIndex = 83;
+ data->addInstruction(i);
+ }
+
QStringList expect;
expect
<< "Index\tOperation\t\tData1\tData2\tData3\tComments"
@@ -524,6 +560,11 @@ void tst_qqmlinstruction::dump()
<< "50\t\tDONE"
<< "51\t\tSTORE_TR_STRING\t99\t3\t14\t14\t2"
<< "52\t\tSTORE_TRID_STRING\t78\t7\t-1"
+ << "53\t\tSTORE_VAR\t\t79\t5\t\t\"color(1, 1, 1, 1)\""
+ << "54\t\tSTORE_VAR_OBJECT\t80"
+ << "55\t\tSTORE_VAR_INTEGER\t81\t23"
+ << "56\t\tSTORE_VAR_DOUBLE\t82\t66.3"
+ << "57\t\tSTORE_VAR_BOOL\t\t83\ttrue"
<< "-------------------------------------------------------------------------------";
messages = QStringList();