aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2013-09-11 10:00:43 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-11 17:12:19 +0200
commit6aabeb55e663933149b716b47bcfbb37525babb4 (patch)
treedeeb666818debf97c0f71d248ddea1531a81bd55 /tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
parent262d7261033df7650938c38401112a4767d926ff (diff)
Fix return type checks in test.
Same problem as 3dbc7a72c7e38b2a34df3a9ef496547c795420af fixed in another test. Same solution. Change-Id: Ib476239e567c43e4657487c34cfc7157a1f5d33f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index acb623989a..dae19dee57 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -659,8 +659,8 @@ void tst_qqmllanguage::assignLiteralToVariant()
QObject *object = component.create();
QVERIFY(object != 0);
- QCOMPARE(object->property("test1").userType(), (int)QVariant::Int);
- QCOMPARE(object->property("test2").userType(), (int)QMetaType::Double);
+ QVERIFY(isJSNumberType(object->property("test1").userType()));
+ QVERIFY(isJSNumberType(object->property("test2").userType()));
QCOMPARE(object->property("test3").userType(), (int)QVariant::String);
QCOMPARE(object->property("test4").userType(), (int)QVariant::Color);
QCOMPARE(object->property("test5").userType(), (int)QVariant::RectF);
@@ -698,7 +698,7 @@ void tst_qqmllanguage::assignLiteralToVar()
QObject *object = component.create();
QVERIFY(object != 0);
- QCOMPARE(object->property("test1").userType(), (int)QMetaType::Int);
+ QVERIFY(isJSNumberType(object->property("test1").userType()));
QCOMPARE(object->property("test2").userType(), (int)QMetaType::Double);
QCOMPARE(object->property("test3").userType(), (int)QVariant::String);
QCOMPARE(object->property("test4").userType(), (int)QVariant::String);
@@ -714,8 +714,8 @@ void tst_qqmllanguage::assignLiteralToVar()
QCOMPARE(object->property("test14").userType(), (int)QVariant::PointF);
QCOMPARE(object->property("test15").userType(), (int)QVariant::SizeF);
QCOMPARE(object->property("test16").userType(), (int)QVariant::Vector3D);
- QCOMPARE(object->property("variantTest1Bound").userType(), (int)QMetaType::Int);
- QCOMPARE(object->property("test1Bound").userType(), (int)QMetaType::Int);
+ QVERIFY(isJSNumberType(object->property("variantTest1Bound").userType()));
+ QVERIFY(isJSNumberType(object->property("test1Bound").userType()));
QCOMPARE(object->property("test1"), QVariant(5));
QCOMPARE(object->property("test2"), QVariant((double)1.7));
@@ -837,8 +837,8 @@ void tst_qqmllanguage::bindJSValueToVar()
QObject *object = root->findChild<QObject *>("varProperties");
- QCOMPARE(object->property("test1").userType(), (int)QMetaType::Int);
- QCOMPARE(object->property("test2").userType(), (int)QMetaType::Double);
+ QVERIFY(isJSNumberType(object->property("test1").userType()));
+ QVERIFY(isJSNumberType(object->property("test2").userType()));
QCOMPARE(object->property("test3").userType(), (int)QVariant::String);
QCOMPARE(object->property("test4").userType(), (int)QVariant::String);
QCOMPARE(object->property("test5").userType(), (int)QVariant::String);
@@ -886,8 +886,8 @@ void tst_qqmllanguage::bindJSValueToVariant()
QObject *object = root->findChild<QObject *>("variantProperties");
- QCOMPARE(object->property("test1").userType(), (int)QMetaType::Int);
- QCOMPARE(object->property("test2").userType(), (int)QMetaType::Double);
+ QVERIFY(isJSNumberType(object->property("test1").userType()));
+ QVERIFY(isJSNumberType(object->property("test2").userType()));
QCOMPARE(object->property("test3").userType(), (int)QVariant::String);
QCOMPARE(object->property("test4").userType(), (int)QVariant::String);
QCOMPARE(object->property("test5").userType(), (int)QVariant::String);