diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-02-08 12:42:12 +0100 |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-02-09 05:58:14 +0100 |
commit | b05039d5efcaec69d01d3737ccb5f0199765632b (patch) | |
tree | 162ad7dc2965087dc38e75e03e25031707309881 /tests/auto/declarative/qdeclarativevaluetypes | |
parent | 5217eddc405565f09340d5ff4a881d833c03a201 (diff) |
Add QDeclarativeDataTest base class to locate test data.
- Remove TEST_FILE and TEST_DATA macros in favour of base
class that uses QFINDTESTDATA to locate the data.
This avoids repeated searching and handles Windows correctly
(executables in release/debug subfolders).
- Modeled after an existing class in the QtQuick2 tests
(see qtdeclarative\tests\auto\shared\util.*).
Change-Id: I9e595953328fb552648cef4c7f712d9000f53832
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativevaluetypes')
-rw-r--r-- | tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro | 8 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp | 138 |
2 files changed, 66 insertions, 80 deletions
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro index f2193bc9..ff64bb25 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro +++ b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro @@ -10,13 +10,7 @@ HEADERS += testtypes.h SOURCES += tst_qdeclarativevaluetypes.cpp \ testtypes.cpp -symbian: { - importFiles.files = data - importFiles.path = . - DEPLOYMENT += importFiles -} else { - DEFINES += SRCDIR=\\\"$$PWD\\\" -} +include(../shared/qdeclarativedatatest.pri) CONFIG += parallel_test diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp index 9d39c2bb..ea87d7ac 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp +++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp @@ -45,17 +45,13 @@ #include <QDebug> #include <private/qdeclarativevaluetype_p.h> #include "testtypes.h" - -#ifdef Q_OS_SYMBIAN -// In Symbian OS test data is located in applications private dir -#define SRCDIR "." -#endif +#include <qdeclarativedatatest.h> QT_BEGIN_NAMESPACE extern Q_GUI_EXPORT int qt_defaultDpi(); QT_END_NAMESPACE -class tst_qdeclarativevaluetypes : public QObject +class tst_qdeclarativevaluetypes : public QDeclarativeDataTest { Q_OBJECT public: @@ -103,18 +99,14 @@ private: void tst_qdeclarativevaluetypes::initTestCase() { + QDeclarativeDataTest::initTestCase(); registerTypes(); } -inline QUrl TEST_FILE(const QString &filename) -{ - return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename); -} - void tst_qdeclarativevaluetypes::point() { { - QDeclarativeComponent component(&engine, TEST_FILE("point_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("point_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -126,7 +118,7 @@ void tst_qdeclarativevaluetypes::point() } { - QDeclarativeComponent component(&engine, TEST_FILE("point_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("point_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -139,7 +131,7 @@ void tst_qdeclarativevaluetypes::point() void tst_qdeclarativevaluetypes::pointf() { { - QDeclarativeComponent component(&engine, TEST_FILE("pointf_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("pointf_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -151,7 +143,7 @@ void tst_qdeclarativevaluetypes::pointf() } { - QDeclarativeComponent component(&engine, TEST_FILE("pointf_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("pointf_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -164,7 +156,7 @@ void tst_qdeclarativevaluetypes::pointf() void tst_qdeclarativevaluetypes::size() { { - QDeclarativeComponent component(&engine, TEST_FILE("size_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("size_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -176,7 +168,7 @@ void tst_qdeclarativevaluetypes::size() } { - QDeclarativeComponent component(&engine, TEST_FILE("size_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("size_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -189,7 +181,7 @@ void tst_qdeclarativevaluetypes::size() void tst_qdeclarativevaluetypes::sizef() { { - QDeclarativeComponent component(&engine, TEST_FILE("sizef_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("sizef_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -201,7 +193,7 @@ void tst_qdeclarativevaluetypes::sizef() } { - QDeclarativeComponent component(&engine, TEST_FILE("sizef_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("sizef_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -213,7 +205,7 @@ void tst_qdeclarativevaluetypes::sizef() void tst_qdeclarativevaluetypes::variant() { - QDeclarativeComponent component(&engine, TEST_FILE("variant_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("variant_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -227,7 +219,7 @@ void tst_qdeclarativevaluetypes::variant() void tst_qdeclarativevaluetypes::sizereadonly() { { - QDeclarativeComponent component(&engine, TEST_FILE("sizereadonly_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("sizereadonly_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -239,25 +231,25 @@ void tst_qdeclarativevaluetypes::sizereadonly() } { - QDeclarativeComponent component(&engine, TEST_FILE("sizereadonly_writeerror.qml")); + QDeclarativeComponent component(&engine, testFileUrl("sizereadonly_writeerror.qml")); QVERIFY(component.isError()); QCOMPARE(component.errors().at(0).description(), QLatin1String("Invalid property assignment: \"sizereadonly\" is a read-only property")); } { - QDeclarativeComponent component(&engine, TEST_FILE("sizereadonly_writeerror2.qml")); + QDeclarativeComponent component(&engine, testFileUrl("sizereadonly_writeerror2.qml")); QVERIFY(component.isError()); QCOMPARE(component.errors().at(0).description(), QLatin1String("Invalid property assignment: \"sizereadonly\" is a read-only property")); } { - QDeclarativeComponent component(&engine, TEST_FILE("sizereadonly_writeerror3.qml")); + QDeclarativeComponent component(&engine, testFileUrl("sizereadonly_writeerror3.qml")); QVERIFY(component.isError()); QCOMPARE(component.errors().at(0).description(), QLatin1String("Invalid property assignment: \"sizereadonly\" is a read-only property")); } { - QDeclarativeComponent component(&engine, TEST_FILE("sizereadonly_writeerror4.qml")); + QDeclarativeComponent component(&engine, testFileUrl("sizereadonly_writeerror4.qml")); QObject *object = component.create(); QVERIFY(object); @@ -271,7 +263,7 @@ void tst_qdeclarativevaluetypes::sizereadonly() void tst_qdeclarativevaluetypes::rect() { { - QDeclarativeComponent component(&engine, TEST_FILE("rect_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("rect_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -285,7 +277,7 @@ void tst_qdeclarativevaluetypes::rect() } { - QDeclarativeComponent component(&engine, TEST_FILE("rect_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("rect_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -298,7 +290,7 @@ void tst_qdeclarativevaluetypes::rect() void tst_qdeclarativevaluetypes::rectf() { { - QDeclarativeComponent component(&engine, TEST_FILE("rectf_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("rectf_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -312,7 +304,7 @@ void tst_qdeclarativevaluetypes::rectf() } { - QDeclarativeComponent component(&engine, TEST_FILE("rectf_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("rectf_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -325,7 +317,7 @@ void tst_qdeclarativevaluetypes::rectf() void tst_qdeclarativevaluetypes::vector2d() { { - QDeclarativeComponent component(&engine, TEST_FILE("vector2d_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("vector2d_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -337,7 +329,7 @@ void tst_qdeclarativevaluetypes::vector2d() } { - QDeclarativeComponent component(&engine, TEST_FILE("vector2d_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("vector2d_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -350,7 +342,7 @@ void tst_qdeclarativevaluetypes::vector2d() void tst_qdeclarativevaluetypes::vector3d() { { - QDeclarativeComponent component(&engine, TEST_FILE("vector3d_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("vector3d_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -363,7 +355,7 @@ void tst_qdeclarativevaluetypes::vector3d() } { - QDeclarativeComponent component(&engine, TEST_FILE("vector3d_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("vector3d_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -376,7 +368,7 @@ void tst_qdeclarativevaluetypes::vector3d() void tst_qdeclarativevaluetypes::vector4d() { { - QDeclarativeComponent component(&engine, TEST_FILE("vector4d_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("vector4d_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -390,7 +382,7 @@ void tst_qdeclarativevaluetypes::vector4d() } { - QDeclarativeComponent component(&engine, TEST_FILE("vector4d_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("vector4d_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -403,7 +395,7 @@ void tst_qdeclarativevaluetypes::vector4d() void tst_qdeclarativevaluetypes::quaternion() { { - QDeclarativeComponent component(&engine, TEST_FILE("quaternion_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("quaternion_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -417,7 +409,7 @@ void tst_qdeclarativevaluetypes::quaternion() } { - QDeclarativeComponent component(&engine, TEST_FILE("quaternion_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("quaternion_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -430,7 +422,7 @@ void tst_qdeclarativevaluetypes::quaternion() void tst_qdeclarativevaluetypes::matrix4x4() { { - QDeclarativeComponent component(&engine, TEST_FILE("matrix4x4_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("matrix4x4_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -460,7 +452,7 @@ void tst_qdeclarativevaluetypes::matrix4x4() } { - QDeclarativeComponent component(&engine, TEST_FILE("matrix4x4_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("matrix4x4_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -476,7 +468,7 @@ void tst_qdeclarativevaluetypes::matrix4x4() void tst_qdeclarativevaluetypes::font() { { - QDeclarativeComponent component(&engine, TEST_FILE("font_read.qml")); + QDeclarativeComponent component(&engine, testFileUrl("font_read.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -499,7 +491,7 @@ void tst_qdeclarativevaluetypes::font() } { - QDeclarativeComponent component(&engine, TEST_FILE("font_write.qml")); + QDeclarativeComponent component(&engine, testFileUrl("font_write.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -532,7 +524,7 @@ void tst_qdeclarativevaluetypes::font() // Test pixelSize { - QDeclarativeComponent component(&engine, TEST_FILE("font_write.2.qml")); + QDeclarativeComponent component(&engine, testFileUrl("font_write.2.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -543,7 +535,7 @@ void tst_qdeclarativevaluetypes::font() // Test pixelSize and pointSize { - QDeclarativeComponent component(&engine, TEST_FILE("font_write.3.qml")); + QDeclarativeComponent component(&engine, testFileUrl("font_write.3.qml")); QTest::ignoreMessage(QtWarningMsg, "Both point size and pixel size set. Using pixel size. "); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -553,7 +545,7 @@ void tst_qdeclarativevaluetypes::font() delete object; } { - QDeclarativeComponent component(&engine, TEST_FILE("font_write.4.qml")); + QDeclarativeComponent component(&engine, testFileUrl("font_write.4.qml")); QTest::ignoreMessage(QtWarningMsg, "Both point size and pixel size set. Using pixel size. "); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -563,7 +555,7 @@ void tst_qdeclarativevaluetypes::font() delete object; } { - QDeclarativeComponent component(&engine, TEST_FILE("font_write.5.qml")); + QDeclarativeComponent component(&engine, testFileUrl("font_write.5.qml")); QObject *object = qobject_cast<QObject *>(component.create()); QVERIFY(object != 0); MyTypeObject *object1 = object->findChild<MyTypeObject *>("object1"); @@ -581,7 +573,7 @@ void tst_qdeclarativevaluetypes::font() // Test bindings can write to value types void tst_qdeclarativevaluetypes::bindingAssignment() { - QDeclarativeComponent component(&engine, TEST_FILE("bindingAssignment.qml")); + QDeclarativeComponent component(&engine, testFileUrl("bindingAssignment.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -597,7 +589,7 @@ void tst_qdeclarativevaluetypes::bindingAssignment() // Test bindings can read from value types void tst_qdeclarativevaluetypes::bindingRead() { - QDeclarativeComponent component(&engine, TEST_FILE("bindingRead.qml")); + QDeclarativeComponent component(&engine, testFileUrl("bindingRead.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -613,7 +605,7 @@ void tst_qdeclarativevaluetypes::bindingRead() // Test static values can assign to value types void tst_qdeclarativevaluetypes::staticAssignment() { - QDeclarativeComponent component(&engine, TEST_FILE("staticAssignment.qml")); + QDeclarativeComponent component(&engine, testFileUrl("staticAssignment.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -625,7 +617,7 @@ void tst_qdeclarativevaluetypes::staticAssignment() // Test scripts can read/write value types void tst_qdeclarativevaluetypes::scriptAccess() { - QDeclarativeComponent component(&engine, TEST_FILE("scriptAccess.qml")); + QDeclarativeComponent component(&engine, testFileUrl("scriptAccess.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -640,7 +632,7 @@ void tst_qdeclarativevaluetypes::scriptAccess() void tst_qdeclarativevaluetypes::autoBindingRemoval() { { - QDeclarativeComponent component(&engine, TEST_FILE("autoBindingRemoval.qml")); + QDeclarativeComponent component(&engine, testFileUrl("autoBindingRemoval.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -663,7 +655,7 @@ void tst_qdeclarativevaluetypes::autoBindingRemoval() /* { - QDeclarativeComponent component(&engine, TEST_FILE("autoBindingRemoval.2.qml")); + QDeclarativeComponent component(&engine, testFileUrl("autoBindingRemoval.2.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -685,7 +677,7 @@ void tst_qdeclarativevaluetypes::autoBindingRemoval() } { - QDeclarativeComponent component(&engine, TEST_FILE("autoBindingRemoval.3.qml")); + QDeclarativeComponent component(&engine, testFileUrl("autoBindingRemoval.3.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -709,7 +701,7 @@ void tst_qdeclarativevaluetypes::autoBindingRemoval() // Test that property value sources assign to value types void tst_qdeclarativevaluetypes::valueSources() { - QDeclarativeComponent component(&engine, TEST_FILE("valueSources.qml")); + QDeclarativeComponent component(&engine, testFileUrl("valueSources.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -732,7 +724,7 @@ static void checkNoErrors(QDeclarativeComponent& component) // Test that property value interceptors can be applied to value types void tst_qdeclarativevaluetypes::valueInterceptors() { - QDeclarativeComponent component(&engine, TEST_FILE("valueInterceptors.qml")); + QDeclarativeComponent component(&engine, testFileUrl("valueInterceptors.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); checkNoErrors(component); QVERIFY(object != 0); @@ -749,7 +741,7 @@ void tst_qdeclarativevaluetypes::valueInterceptors() // Test that you can't assign a binding to the "root" value type, and a sub-property void tst_qdeclarativevaluetypes::bindingConflict() { - QDeclarativeComponent component(&engine, TEST_FILE("bindingConflict.qml")); + QDeclarativeComponent component(&engine, testFileUrl("bindingConflict.qml")); QCOMPARE(component.isError(), true); } @@ -766,7 +758,7 @@ void tst_qdeclarativevaluetypes::bindingConflict() // doesn't crash void tst_qdeclarativevaluetypes::deletedObject() { - QDeclarativeComponent component(&engine, TEST_FILE("deletedObject.qml")); + QDeclarativeComponent component(&engine, testFileUrl("deletedObject.qml")); QTest::ignoreMessage(QtDebugMsg, "Test: 2"); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -784,7 +776,7 @@ void tst_qdeclarativevaluetypes::deletedObject() // Test that value types can be assigned to another value type property in a binding void tst_qdeclarativevaluetypes::bindingVariantCopy() { - QDeclarativeComponent component(&engine, TEST_FILE("bindingVariantCopy.qml")); + QDeclarativeComponent component(&engine, testFileUrl("bindingVariantCopy.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -796,7 +788,7 @@ void tst_qdeclarativevaluetypes::bindingVariantCopy() // Test that value types can be assigned to another value type property in script void tst_qdeclarativevaluetypes::scriptVariantCopy() { - QDeclarativeComponent component(&engine, TEST_FILE("scriptVariantCopy.qml")); + QDeclarativeComponent component(&engine, testFileUrl("scriptVariantCopy.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); @@ -832,7 +824,7 @@ void tst_qdeclarativevaluetypes::cppClasses() void tst_qdeclarativevaluetypes::enums() { { - QDeclarativeComponent component(&engine, TEST_FILE("enums.1.qml")); + QDeclarativeComponent component(&engine, testFileUrl("enums.1.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); QVERIFY(object->font().capitalization() == QFont::AllUppercase); @@ -840,7 +832,7 @@ void tst_qdeclarativevaluetypes::enums() } { - QDeclarativeComponent component(&engine, TEST_FILE("enums.2.qml")); + QDeclarativeComponent component(&engine, testFileUrl("enums.2.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); QVERIFY(object->font().capitalization() == QFont::AllUppercase); @@ -848,7 +840,7 @@ void tst_qdeclarativevaluetypes::enums() } { - QDeclarativeComponent component(&engine, TEST_FILE("enums.3.qml")); + QDeclarativeComponent component(&engine, testFileUrl("enums.3.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); QVERIFY(object->font().capitalization() == QFont::AllUppercase); @@ -856,7 +848,7 @@ void tst_qdeclarativevaluetypes::enums() } { - QDeclarativeComponent component(&engine, TEST_FILE("enums.4.qml")); + QDeclarativeComponent component(&engine, testFileUrl("enums.4.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); QVERIFY(object->font().capitalization() == QFont::AllUppercase); @@ -864,7 +856,7 @@ void tst_qdeclarativevaluetypes::enums() } { - QDeclarativeComponent component(&engine, TEST_FILE("enums.5.qml")); + QDeclarativeComponent component(&engine, testFileUrl("enums.5.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); QVERIFY(object->font().capitalization() == QFont::AllUppercase); @@ -877,7 +869,7 @@ void tst_qdeclarativevaluetypes::enums() void tst_qdeclarativevaluetypes::conflictingBindings() { { - QDeclarativeComponent component(&engine, TEST_FILE("conflicting.1.qml")); + QDeclarativeComponent component(&engine, testFileUrl("conflicting.1.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -895,7 +887,7 @@ void tst_qdeclarativevaluetypes::conflictingBindings() } { - QDeclarativeComponent component(&engine, TEST_FILE("conflicting.2.qml")); + QDeclarativeComponent component(&engine, testFileUrl("conflicting.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -913,7 +905,7 @@ void tst_qdeclarativevaluetypes::conflictingBindings() } { - QDeclarativeComponent component(&engine, TEST_FILE("conflicting.3.qml")); + QDeclarativeComponent component(&engine, testFileUrl("conflicting.3.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -933,7 +925,7 @@ void tst_qdeclarativevaluetypes::conflictingBindings() void tst_qdeclarativevaluetypes::returnValues() { - QDeclarativeComponent component(&engine, TEST_FILE("returnValues.qml")); + QDeclarativeComponent component(&engine, testFileUrl("returnValues.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -946,7 +938,7 @@ void tst_qdeclarativevaluetypes::returnValues() void tst_qdeclarativevaluetypes::varAssignment() { - QDeclarativeComponent component(&engine, TEST_FILE("varAssignment.qml")); + QDeclarativeComponent component(&engine, testFileUrl("varAssignment.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -961,7 +953,7 @@ void tst_qdeclarativevaluetypes::varAssignment() void tst_qdeclarativevaluetypes::bindingsSpliceCorrectly() { { - QDeclarativeComponent component(&engine, TEST_FILE("bindingsSpliceCorrectly.1.qml")); + QDeclarativeComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.1.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -971,7 +963,7 @@ void tst_qdeclarativevaluetypes::bindingsSpliceCorrectly() } { - QDeclarativeComponent component(&engine, TEST_FILE("bindingsSpliceCorrectly.2.qml")); + QDeclarativeComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -982,7 +974,7 @@ void tst_qdeclarativevaluetypes::bindingsSpliceCorrectly() { - QDeclarativeComponent component(&engine, TEST_FILE("bindingsSpliceCorrectly.3.qml")); + QDeclarativeComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.3.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -992,7 +984,7 @@ void tst_qdeclarativevaluetypes::bindingsSpliceCorrectly() } { - QDeclarativeComponent component(&engine, TEST_FILE("bindingsSpliceCorrectly.4.qml")); + QDeclarativeComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.4.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1002,7 +994,7 @@ void tst_qdeclarativevaluetypes::bindingsSpliceCorrectly() } { - QDeclarativeComponent component(&engine, TEST_FILE("bindingsSpliceCorrectly.5.qml")); + QDeclarativeComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.5.qml")); QObject *object = component.create(); QVERIFY(object != 0); |