diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-24 15:27:58 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-29 09:44:39 +0000 |
commit | 0ea3c24cfe7d1057964fe864924a7ee083764084 (patch) | |
tree | 681b7df0a201641203c936e748afd7d6a7ec39b5 /tests/auto/qml/qqmllocale | |
parent | bb87365ffabcba3a70dd49a4c3232a12b5b224a3 (diff) |
tests/qml: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Change-Id: I8cc97fd9b48fc789a849e9527c292c4e05accd97
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/qqmllocale')
-rw-r--r-- | tests/auto/qml/qqmllocale/tst_qqmllocale.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp index 011db7b363..ba3f72f2c1 100644 --- a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp +++ b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp @@ -451,7 +451,7 @@ void tst_qqmllocale::firstDayOfWeek() Q_ARG(QVariant, QVariant(locale))); QVariant val = obj->property("firstDayOfWeek"); - QVERIFY(val.type() == QVariant::Int); + QCOMPARE(val.type(), QVariant::Int); int day = int(QLocale(locale).firstDayOfWeek()); if (day == 7) // JS Date days in range 0(Sunday) to 6(Saturday) @@ -486,12 +486,12 @@ void tst_qqmllocale::weekDays() Q_ARG(QVariant, QVariant(locale))); QVariant val = obj->property("weekDays"); - QVERIFY(val.userType() == qMetaTypeId<QJSValue>()); + QCOMPARE(val.userType(), qMetaTypeId<QJSValue>()); QList<QVariant> qmlDays = val.toList(); QList<Qt::DayOfWeek> days = QLocale(locale).weekdays(); - QVERIFY(days.count() == qmlDays.count()); + QCOMPARE(days.count(), qmlDays.count()); for (int i = 0; i < days.count(); ++i) { int day = int(days.at(i)); @@ -528,12 +528,12 @@ void tst_qqmllocale::uiLanguages() Q_ARG(QVariant, QVariant(locale))); QVariant val = obj->property("uiLanguages"); - QVERIFY(val.userType() == qMetaTypeId<QJSValue>()); + QCOMPARE(val.userType(), qMetaTypeId<QJSValue>()); QList<QVariant> qmlLangs = val.toList(); QStringList langs = QLocale(locale).uiLanguages(); - QVERIFY(langs.count() == qmlLangs.count()); + QCOMPARE(langs.count(), qmlLangs.count()); for (int i = 0; i < langs.count(); ++i) { QCOMPARE(langs.at(i), qmlLangs.at(i).toString()); |