Remove "All rights reserved" line from license headers.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativelistreference / tst_qdeclarativelistreference.cpp
index f60c5c4..bfd2ea2 100644 (file)
@@ -1,8 +1,7 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
 **
 ** This file is part of the test suite of the Qt Toolkit.
 **
@@ -35,6 +34,7 @@
 **
 **
 **
+**
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
 #include <QtDeclarative/qdeclarativeprivate.h>
 #include <QtDeclarative/qdeclarativeproperty.h>
 #include <QDebug>
+#include "../../shared/util.h"
 
-inline QUrl TEST_FILE(const QString &filename)
-{
-    QFileInfo fileInfo(__FILE__);
-    return QUrl::fromLocalFile(fileInfo.absoluteDir().filePath("data/" + filename));
-}
-
-inline QUrl TEST_FILE(const char *filename)
-{
-    return TEST_FILE(QLatin1String(filename));
-}
-
-class tst_qdeclarativelistreference : public QObject
+class tst_qdeclarativelistreference : public QDeclarativeDataTest
 {
     Q_OBJECT
 public:
@@ -105,6 +95,7 @@ public:
 
 void tst_qdeclarativelistreference::initTestCase()
 {
+    QDeclarativeDataTest::initTestCase();
     qmlRegisterType<TestType>();
 }
 
@@ -540,7 +531,7 @@ void tst_qdeclarativelistreference::qmlmetaproperty()
 void tst_qdeclarativelistreference::engineTypes()
 {
     QDeclarativeEngine engine;
-    QDeclarativeComponent component(&engine, TEST_FILE("engineTypes.qml"));
+    QDeclarativeComponent component(&engine, testFileUrl("engineTypes.qml"));
 
     QObject *o = component.create();
     QVERIFY(o);
@@ -563,7 +554,7 @@ void tst_qdeclarativelistreference::engineTypes()
 void tst_qdeclarativelistreference::variantToList()
 {
     QDeclarativeEngine engine;
-    QDeclarativeComponent component(&engine, TEST_FILE("variantToList.qml"));
+    QDeclarativeComponent component(&engine, testFileUrl("variantToList.qml"));
 
     QObject *o = component.create();
     QVERIFY(o);