aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/testlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/testlib')
-rw-r--r--src/imports/testlib/TestCase.qml10
-rw-r--r--src/imports/testlib/plugins.qmltypes32
2 files changed, 37 insertions, 5 deletions
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml
index fbfad28209..0bec4cddf2 100644
--- a/src/imports/testlib/TestCase.qml
+++ b/src/imports/testlib/TestCase.qml
@@ -143,7 +143,7 @@ Item {
if ("mapFromItem" in o && "mapToItem" in o) {
return "declarativeitem"; // @todo improve detection of declarative items
} else if ("x" in o && "y" in o && "z" in o) {
- return "vector3d"; // Qt3D vector
+ return "vector3d"; // Qt 3D vector
}
return "object";
} else if (o instanceof Function) {
@@ -291,6 +291,11 @@ Item {
}
function tryCompare(obj, prop, value, timeout) {
+ if (arguments.length == 2) {
+ qtest_results.fail("A value is required for tryCompare",
+ util.callerFile(), util.callerLine())
+ throw new Error("QtQuickTest::fail")
+ }
if (!timeout)
timeout = 5000
if (!qtest_compareInternal(obj[prop], value))
@@ -682,6 +687,9 @@ Item {
qtest_runFunction(prop, null, isBenchmark)
}
qtest_results.finishTestFunction()
+ // wait(0) will call processEvents() so objects marked for deletion
+ // in the test function will be deleted.
+ wait(0)
qtest_results.skipped = false
}
diff --git a/src/imports/testlib/plugins.qmltypes b/src/imports/testlib/plugins.qmltypes
index 5ad3f891f9..2865812eb2 100644
--- a/src/imports/testlib/plugins.qmltypes
+++ b/src/imports/testlib/plugins.qmltypes
@@ -3,13 +3,14 @@ import QtQuick.tooling 1.1
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
-// This file was auto-generated with the command 'qmlplugindump QtTest 1.0'.
+// This file was auto-generated with the command 'qmlplugindump -notrelocatable QtTest 1.0'.
Module {
Component {
name: "QuickTestEvent"
prototype: "QObject"
- exports: ["TestEvent 1.0"]
+ exports: ["QtTest/TestEvent 1.0"]
+ exportMetaObjectRevisions: [0]
Method {
name: "keyPress"
type: "bool"
@@ -32,6 +33,27 @@ Module {
Parameter { name: "delay"; type: "int" }
}
Method {
+ name: "keyPressChar"
+ type: "bool"
+ Parameter { name: "character"; type: "string" }
+ Parameter { name: "modifiers"; type: "int" }
+ Parameter { name: "delay"; type: "int" }
+ }
+ Method {
+ name: "keyReleaseChar"
+ type: "bool"
+ Parameter { name: "character"; type: "string" }
+ Parameter { name: "modifiers"; type: "int" }
+ Parameter { name: "delay"; type: "int" }
+ }
+ Method {
+ name: "keyClickChar"
+ type: "bool"
+ Parameter { name: "character"; type: "string" }
+ Parameter { name: "modifiers"; type: "int" }
+ Parameter { name: "delay"; type: "int" }
+ }
+ Method {
name: "mousePress"
type: "bool"
Parameter { name: "item"; type: "QObject"; isPointer: true }
@@ -96,7 +118,8 @@ Module {
Component {
name: "QuickTestResult"
prototype: "QObject"
- exports: ["TestResult 1.0"]
+ exports: ["QtTest/TestResult 1.0"]
+ exportMetaObjectRevisions: [0]
Enum {
name: "RunMode"
values: {
@@ -230,7 +253,8 @@ Module {
Component {
name: "QuickTestUtil"
prototype: "QObject"
- exports: ["TestUtil 1.0"]
+ exports: ["QtTest/TestUtil 1.0"]
+ exportMetaObjectRevisions: [0]
Property { name: "printAvailableFunctions"; type: "bool"; isReadonly: true }
Property { name: "dragThreshold"; type: "int"; isReadonly: true }
Method {