/****************************************************************************
**
-** 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.
**
**
**
**
+**
** $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:
void tst_qdeclarativelistreference::initTestCase()
{
+ QDeclarativeDataTest::initTestCase();
qmlRegisterType<TestType>();
}
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);
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);