diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-03-22 22:37:56 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-03-22 23:29:36 (GMT) |
commit | c3d8fef05b011a737ce15791e94aef84d27d1b8f (patch) | |
tree | 6c2712962c2d21122af2677c1b0c4eece2283edb | |
parent | 190b2667b54eff4540e6b204d0cda39847417a52 (diff) | |
download | Qt-c3d8fef05b011a737ce15791e94aef84d27d1b8f.zip Qt-c3d8fef05b011a737ce15791e94aef84d27d1b8f.tar.gz Qt-c3d8fef05b011a737ce15791e94aef84d27d1b8f.tar.bz2 |
Fix test (StoreScriptImported shifted enum values)
Adds test for StoreScriptImported.
Makes invalid instruction test resistant to future changes.
-rw-r--r-- | tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp index 5f6d9a4..c747bfc 100644 --- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp +++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp @@ -507,8 +507,16 @@ void tst_qdeclarativeinstruction::dump() { QDeclarativeInstruction i; + i.line = 48; + i.type = QDeclarativeInstruction::StoreImportedScript; + i.storeScript.value = 2; + data->bytecode << i; + } + + { + QDeclarativeInstruction i; i.line = 50; - i.type = (QDeclarativeInstruction::Type)(QDeclarativeInstruction::Defer + 1); // Non-existant + i.type = (QDeclarativeInstruction::Type)(1234); // Non-existant data->bytecode << i; } @@ -564,7 +572,8 @@ void tst_qdeclarativeinstruction::dump() << "45\t\t47\tPOP_VALUE\t\t35\t8" << "46\t\t48\tDEFER\t\t\t7" << "47\t\tNA\tDEFER\t\t\t7" - << "48\t\t50\tXXX UNKOWN INSTRUCTION\t47" + << "48\t\t48\tSTORE_IMPORTED_SCRIPT\t2" + << "49\t\t50\tXXX UNKOWN INSTRUCTION\t1234" << "-------------------------------------------------------------------------------"; messages = QStringList(); |