diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-05-20 03:01:10 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-05-20 04:27:26 (GMT) |
commit | e792c38a265ecf21b508e98c9c81e3da8576d709 (patch) | |
tree | 7bcccb9d9786dbba44980ff669484d5fda87b874 /tests | |
parent | 3eb8f4b9cf8c643d0198ca0af298376b4f1b74e3 (diff) | |
download | Qt-e792c38a265ecf21b508e98c9c81e3da8576d709.zip Qt-e792c38a265ecf21b508e98c9c81e3da8576d709.tar.gz Qt-e792c38a265ecf21b508e98c9c81e3da8576d709.tar.bz2 |
Improve error messages when tests fail.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 32d5da7..4900fa2 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -2102,20 +2102,21 @@ void tst_qdeclarativeecmascript::numberAssignment() QObject *object = component.create(); QVERIFY(object != 0); - QVERIFY(object->property("test1") == QVariant((qreal)6.7)); - QVERIFY(object->property("test2") == QVariant((qreal)6.7)); - QVERIFY(object->property("test3") == QVariant((qreal)6)); - QVERIFY(object->property("test4") == QVariant((qreal)6)); - - QVERIFY(object->property("test5") == QVariant((int)7)); - QVERIFY(object->property("test6") == QVariant((int)7)); - QVERIFY(object->property("test7") == QVariant((int)6)); - QVERIFY(object->property("test8") == QVariant((int)6)); - - QVERIFY(object->property("test9") == QVariant((unsigned int)7)); - QVERIFY(object->property("test10") == QVariant((unsigned int)7)); - QVERIFY(object->property("test11") == QVariant((unsigned int)6)); - QVERIFY(object->property("test12") == QVariant((unsigned int)6)); + QCOMPARE(object->property("test1"), QVariant((qreal)6.7)); + QCOMPARE(object->property("test2"), QVariant((qreal)6.7)); + QCOMPARE(object->property("test2"), QVariant((qreal)6.7)); + QCOMPARE(object->property("test3"), QVariant((qreal)6)); + QCOMPARE(object->property("test4"), QVariant((qreal)6)); + + QCOMPARE(object->property("test5"), QVariant((int)7)); + QCOMPARE(object->property("test6"), QVariant((int)7)); + QCOMPARE(object->property("test7"), QVariant((int)6)); + QCOMPARE(object->property("test8"), QVariant((int)6)); + + QCOMPARE(object->property("test9"), QVariant((unsigned int)7)); + QCOMPARE(object->property("test10"), QVariant((unsigned int)7)); + QCOMPARE(object->property("test11"), QVariant((unsigned int)6)); + QCOMPARE(object->property("test12"), QVariant((unsigned int)6)); delete object; } |