summaryrefslogtreecommitdiff
path: root/tests/tst_qml
diff options
context:
space:
mode:
authorMathias Hasselmann <mathias.hasselmann@kdab.com>2013-11-13 22:53:35 +0100
committerMathias Hasselmann <mathias.hasselmann@kdab.com>2013-11-13 23:02:16 +0100
commit30f9bd3d57b673b9962264d14f8087c5381abb75 (patch)
tree0a19a96182691147164ff61c09212407a935835a /tests/tst_qml
parenta0e901691b91eaf293a50f01cf9eaaf08f6c963a (diff)
Make properties resetable
Diffstat (limited to 'tests/tst_qml')
-rw-r--r--tests/tst_qml/tst_quickstreamer.qml37
1 files changed, 27 insertions, 10 deletions
diff --git a/tests/tst_qml/tst_quickstreamer.qml b/tests/tst_qml/tst_quickstreamer.qml
index acf32c5..e04b6d1 100644
--- a/tests/tst_qml/tst_quickstreamer.qml
+++ b/tests/tst_qml/tst_quickstreamer.qml
@@ -5,16 +5,17 @@ TestCase {
name: "QuickStreamer"
Pipeline {
- id: "pipeline"
+ id: pipeline
+ name: "brouhaha"
- AppSrc {
- id: appSource
- name: "brouhaha"
- }
+ AppSrc { id: appSource }
+ AppSink { id: appSink }
+ }
- AppSink {
- id: appSink
- }
+ SignalSpy {
+ id: pipelineNameSpy
+ target: pipeline
+ signalName: "nameChanged"
}
AudioTestSrc {
@@ -29,9 +30,25 @@ TestCase {
function test_nameProperty()
{
- compare(pipeline.name, "pipeline0")
+ compare(pipeline.name, "brouhaha")
+ compare(appSource.name, "appsrc0")
compare(appSink.name, "appsink0")
- compare(appSource.name, "brouhaha")
+
+ compare(pipelineNameSpy.count, 0)
+ compare(pipeline.name, "brouhaha")
+ compare(pipelineNameSpy.count, 0)
+
+ pipeline.name = "silence"
+
+ compare(pipelineNameSpy.count, 1)
+ compare(pipeline.name, "silence")
+ compare(pipelineNameSpy.count, 1)
+
+ pipeline.name = undefined
+
+ compare(pipelineNameSpy.count, 2)
+ compare(pipeline.name, "pipeline1")
+ compare(pipelineNameSpy.count, 2)
}
function test_children()