Watch
1
0
Fork
You've already forked Zoe-Dotfiles
0
mirror of synced 2026-11-05 00:57:18 +00:00
This commit is contained in:
MysteryBirb 2026-10-02 09:58:41 +02:00
commit 5b86f93f43
6 changed files with 670 additions and 0 deletions

View file

@ -0,0 +1,50 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtTest 1.0
import "../my-qml-lib"
import "../external"
MyQmlType {
id: testObj
TestCase {
name: "QML Test Sample"
property Deps deps
property var depsFactory: Qt.createComponent("Deps.qml")
property QmlUtil util
property var utilFactory: Qt.createComponent("../external/QmlUtil.qml")
SignalSpy {
id: depsCreatedSpy
target: deps
signalName: "created"
}
function setup() {
if (deps != null) {
teardown()
}
verify(depsFactory != null)
compare(depsFactory.status, Component.Ready)
deps = depsFactory.createObject(this)
}
function teardown() {
if (deps != null) {
deps.destroy()
deps = null
}
}
function test_should_do_something() {
setup()
// test code (assertion......)
compare(testObj.number, 17)
teardown()
}
}
}