diff options
author | Robin Burchell <robin.burchell@crimson.no> | 2017-04-05 11:50:44 +0200 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2017-04-06 12:00:23 +0000 |
commit | 29312ffc89842d5c81309031b14a8d335889aa9a (patch) | |
tree | 462a187f2940e72be8e00056ce78f104cc798b33 /benchmarks | |
parent | b6e8453d1118e305c512f20256bddc1d4744d581 (diff) |
Add tests covering variant as well as var
They have separate implementations, so we should cover them both.
Change-Id: I3d3e8d950984ae88590ee18b3de1b98cb8c08860
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'benchmarks')
5 files changed, 70 insertions, 0 deletions
diff --git a/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_array.qml b/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_array.qml new file mode 100644 index 0000000..e220943 --- /dev/null +++ b/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_array.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 +import QmlBench 1.0 + +// Tests the creation of the JS variant type as a property. +CreationBenchmark { + id: root; + count: 50 + staticCount: 2500 + delegate: Item { + property var value: [42] + } +} + + diff --git a/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_bool.qml b/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_bool.qml new file mode 100644 index 0000000..478bfb4 --- /dev/null +++ b/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_bool.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 +import QmlBench 1.0 + +// Tests the creation of the JS variant type as a property. +CreationBenchmark { + id: root; + count: 50 + staticCount: 2500 + delegate: Item { + property variant value: true + } +} + + diff --git a/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_int.qml b/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_int.qml new file mode 100644 index 0000000..da3a5f9 --- /dev/null +++ b/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_int.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 +import QmlBench 1.0 + +// Tests the creation of the JS variant type as a property. +CreationBenchmark { + id: root; + count: 50 + staticCount: 2500 + delegate: Item { + property variant value: 42 + } +} + + diff --git a/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_object.qml b/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_object.qml new file mode 100644 index 0000000..4b2a863 --- /dev/null +++ b/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_object.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 +import QmlBench 1.0 + +// Tests the creation of the JS variant type as a property. +CreationBenchmark { + id: root; + count: 50 + staticCount: 2500 + delegate: Item { + property variant value: { 42: true } + } +} + + diff --git a/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_string.qml b/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_string.qml new file mode 100644 index 0000000..d8175f2 --- /dev/null +++ b/benchmarks/auto/creation/qml.basictypes/delegates_basictype_variant_string.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 +import QmlBench 1.0 + +// Tests the creation of the JS variant type as a property. +CreationBenchmark { + id: root; + count: 50 + staticCount: 2500 + delegate: Item { + property variant value: "42" + } +} + + |