diff options
Diffstat (limited to 'tests/benchmarks')
4 files changed, 52 insertions, 10 deletions
diff --git a/tests/benchmarks/creationtime/data/dependencies.qml b/tests/benchmarks/creationtime/data/dependencies.qml index 6b6d951b..c284d94c 100644 --- a/tests/benchmarks/creationtime/data/dependencies.qml +++ b/tests/benchmarks/creationtime/data/dependencies.qml @@ -1,5 +1,7 @@ import QtQuick 2.6 import QtQuick.Controls 2.1 +import QtQuick.Controls.Fusion 2.3 +import QtQuick.Controls.Imagine 2.3 import QtQuick.Controls.Material 2.1 import QtQuick.Controls.Universal 2.1 import Qt.labs.calendar 1.0 diff --git a/tests/benchmarks/creationtime/tst_creationtime.cpp b/tests/benchmarks/creationtime/tst_creationtime.cpp index 4909f080..1d300b1c 100644 --- a/tests/benchmarks/creationtime/tst_creationtime.cpp +++ b/tests/benchmarks/creationtime/tst_creationtime.cpp @@ -47,6 +47,12 @@ private slots: void controls(); void controls_data(); + void fusion(); + void fusion_data(); + + void imagine(); + void imagine_data(); + void material(); void material_data(); @@ -89,9 +95,12 @@ static void addTestRows(QQmlEngine *engine, const QString &sourcePath, const QSt if (QFile::exists(filePath)) { QTest::newRow(qPrintable(name)) << QUrl::fromLocalFile(filePath); break; - } else if (QFile::exists(QQmlFile::urlToLocalFileOrQrc(filePath))) { - QTest::newRow(qPrintable(name)) << QUrl(filePath); - break; + } else { + filePath = QQmlFile::urlToLocalFileOrQrc(filePath); + if (!filePath.isEmpty() && QFile::exists(filePath)) { + QTest::newRow(qPrintable(name)) << QUrl(filePath); + break; + } } } } @@ -122,7 +131,31 @@ void tst_CreationTime::controls() void tst_CreationTime::controls_data() { QTest::addColumn<QUrl>("url"); - addTestRows(&engine, "controls", "QtQuick/Controls.2", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator"); + addTestRows(&engine, "controls", "QtQuick/Controls.2", QStringList() << "ApplicationWindow"); +} + +void tst_CreationTime::fusion() +{ + QFETCH(QUrl, url); + doBenchmark(&engine, url); +} + +void tst_CreationTime::fusion_data() +{ + QTest::addColumn<QUrl>("url"); + addTestRows(&engine, "controls/fusion", "QtQuick/Controls.2/Fusion", QStringList() << "ApplicationWindow" << "ButtonPanel" << "CheckIndicator" << "RadioIndicator" << "SliderGroove" << "SliderHandle" << "SwitchIndicator"); +} + +void tst_CreationTime::imagine() +{ + QFETCH(QUrl, url); + doBenchmark(&engine, url); +} + +void tst_CreationTime::imagine_data() +{ + QTest::addColumn<QUrl>("url"); + addTestRows(&engine, "controls/imagine", "QtQuick/Controls.2/Imagine", QStringList() << "ApplicationWindow"); } void tst_CreationTime::material() @@ -134,7 +167,7 @@ void tst_CreationTime::material() void tst_CreationTime::material_data() { QTest::addColumn<QUrl>("url"); - addTestRows(&engine, "controls/material", "QtQuick/Controls.2/Material", QStringList() << "Ripple" << "SliderHandle" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator" << "BoxShadow" << "ElevationEffect" << "CursorDelegate"); + addTestRows(&engine, "controls/material", "QtQuick/Controls.2/Material", QStringList() << "ApplicationWindow" << "Ripple" << "SliderHandle" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator" << "BoxShadow" << "ElevationEffect" << "CursorDelegate"); } void tst_CreationTime::universal() @@ -146,7 +179,7 @@ void tst_CreationTime::universal() void tst_CreationTime::universal_data() { QTest::addColumn<QUrl>("url"); - addTestRows(&engine, "controls/universal", "QtQuick/Controls.2/Universal", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator"); + addTestRows(&engine, "controls/universal", "QtQuick/Controls.2/Universal", QStringList() << "ApplicationWindow" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator"); } void tst_CreationTime::calendar() diff --git a/tests/benchmarks/objectcount/data/dependencies.qml b/tests/benchmarks/objectcount/data/dependencies.qml index 6b6d951b..c284d94c 100644 --- a/tests/benchmarks/objectcount/data/dependencies.qml +++ b/tests/benchmarks/objectcount/data/dependencies.qml @@ -1,5 +1,7 @@ import QtQuick 2.6 import QtQuick.Controls 2.1 +import QtQuick.Controls.Fusion 2.3 +import QtQuick.Controls.Imagine 2.3 import QtQuick.Controls.Material 2.1 import QtQuick.Controls.Universal 2.1 import Qt.labs.calendar 1.0 diff --git a/tests/benchmarks/objectcount/tst_objectcount.cpp b/tests/benchmarks/objectcount/tst_objectcount.cpp index d12f3293..fcb6be5b 100644 --- a/tests/benchmarks/objectcount/tst_objectcount.cpp +++ b/tests/benchmarks/objectcount/tst_objectcount.cpp @@ -112,9 +112,12 @@ static void addTestRows(QQmlEngine *engine, const QString &sourcePath, const QSt if (QFile::exists(filePath)) { QTest::newRow(qPrintable(name)) << QUrl::fromLocalFile(filePath); break; - } else if (QFile::exists(QQmlFile::urlToLocalFileOrQrc(filePath))) { - QTest::newRow(qPrintable(name)) << QUrl(filePath); - break; + } else { + filePath = QQmlFile::urlToLocalFileOrQrc(filePath); + if (!filePath.isEmpty() && QFile::exists(filePath)) { + QTest::newRow(qPrintable(name)) << QUrl(filePath); + break; + } } } } @@ -123,7 +126,9 @@ static void addTestRows(QQmlEngine *engine, const QString &sourcePath, const QSt static void initTestRows(QQmlEngine *engine) { - addTestRows(engine, "controls", "QtQuick/Controls.2", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator"); + addTestRows(engine, "controls", "QtQuick/Controls.2"); + addTestRows(engine, "controls/fusion", "QtQuick/Controls.2/Fusion", QStringList() << "ButtonPanel" << "CheckIndicator" << "RadioIndicator" << "SliderGroove" << "SliderHandle" << "SwitchIndicator"); + addTestRows(engine, "controls/imagine", "QtQuick/Controls.2/Imagine"); addTestRows(engine, "controls/material", "QtQuick/Controls.2/Material", QStringList() << "Ripple" << "SliderHandle" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator" << "BoxShadow" << "ElevationEffect" << "CursorDelegate"); addTestRows(engine, "controls/universal", "QtQuick/Controls.2/Universal", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator"); } |