diff options
Diffstat (limited to 'tests/auto/declarative/v4')
20 files changed, 0 insertions, 703 deletions
diff --git a/tests/auto/declarative/v4/data/conditionalExpr.qml b/tests/auto/declarative/v4/data/conditionalExpr.qml deleted file mode 100644 index b74a95a94b..0000000000 --- a/tests/auto/declarative/v4/data/conditionalExpr.qml +++ /dev/null @@ -1,6 +0,0 @@ -import Qt.v4 1.0 - -Result { - property int n: 2 - result: !n ? 100 : 0 -} diff --git a/tests/auto/declarative/v4/data/doubleBoolJump.qml b/tests/auto/declarative/v4/data/doubleBoolJump.qml deleted file mode 100644 index 2eea73b573..0000000000 --- a/tests/auto/declarative/v4/data/doubleBoolJump.qml +++ /dev/null @@ -1,18 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - QtObject { - property real output: i1.p1 || i2.p2 == "text" ? 0.7 : 0 - } - - QtObject { - id: i2 - property string p2 - } - - QtObject { - id: i1 - property bool p1: false - } -} - diff --git a/tests/auto/declarative/v4/data/fetchException.qml b/tests/auto/declarative/v4/data/fetchException.qml deleted file mode 100644 index 6431fcfae8..0000000000 --- a/tests/auto/declarative/v4/data/fetchException.qml +++ /dev/null @@ -1,6 +0,0 @@ -import QtQuick 2.0 - -Item { - property Item data - property int a: data.x, 1 -} diff --git a/tests/auto/declarative/v4/data/logicalOr.2.qml b/tests/auto/declarative/v4/data/logicalOr.2.qml deleted file mode 100644 index 54fb78b127..0000000000 --- a/tests/auto/declarative/v4/data/logicalOr.2.qml +++ /dev/null @@ -1,6 +0,0 @@ -import Qt.v4 1.0 - -Result { - property string s: "foo" || "bar" - result: s == "foo" -} diff --git a/tests/auto/declarative/v4/data/logicalOr.qml b/tests/auto/declarative/v4/data/logicalOr.qml deleted file mode 100644 index 406a7d83eb..0000000000 --- a/tests/auto/declarative/v4/data/logicalOr.qml +++ /dev/null @@ -1,6 +0,0 @@ -import Qt.v4 1.0 - -Result { - property int a: 10 - result: a == 1 || a == 2 -} diff --git a/tests/auto/declarative/v4/data/nestedLogicalOr.qml b/tests/auto/declarative/v4/data/nestedLogicalOr.qml deleted file mode 100644 index c4478a3e7b..0000000000 --- a/tests/auto/declarative/v4/data/nestedLogicalOr.qml +++ /dev/null @@ -1,14 +0,0 @@ -import Qt.v4 1.0 - -Result { - property bool val1: false - property bool val2: true - property bool val3: false - - property bool b1: (false || false || true) - property bool b2: (false || (false || true)) - property bool b3: ((false || false) || true) - property bool b4: (val1 || (val2 || val3)) ? true : false - - result: b1 && b2 && b3 && b4 -} diff --git a/tests/auto/declarative/v4/data/nestedObjectAccess.qml b/tests/auto/declarative/v4/data/nestedObjectAccess.qml deleted file mode 100644 index 56cd17e41e..0000000000 --- a/tests/auto/declarative/v4/data/nestedObjectAccess.qml +++ /dev/null @@ -1,5 +0,0 @@ -import Qt.v4 1.0 - -Result { - result: nested.result -} diff --git a/tests/auto/declarative/v4/data/nullQObject.qml b/tests/auto/declarative/v4/data/nullQObject.qml deleted file mode 100644 index 00185b3988..0000000000 --- a/tests/auto/declarative/v4/data/nullQObject.qml +++ /dev/null @@ -1,7 +0,0 @@ -import QtQuick 2.0 - -Item { - property QtObject obj - property QtObject test - test: obj -} diff --git a/tests/auto/declarative/v4/data/qrealToIntRounding.qml b/tests/auto/declarative/v4/data/qrealToIntRounding.qml deleted file mode 100644 index ee3d405073..0000000000 --- a/tests/auto/declarative/v4/data/qrealToIntRounding.qml +++ /dev/null @@ -1,10 +0,0 @@ -import QtQuick 2.0 - -QtObject { - property int data: 1 - - property int test1: 6.6 + data - property int test2: 6.2 + data - property int test3: 6 + data -} - diff --git a/tests/auto/declarative/v4/data/qtbug_21883.qml b/tests/auto/declarative/v4/data/qtbug_21883.qml deleted file mode 100644 index a51f97c944..0000000000 --- a/tests/auto/declarative/v4/data/qtbug_21883.qml +++ /dev/null @@ -1,5 +0,0 @@ -import Qt.v4 1.0 - -Result { - property Result dummy: Result -} diff --git a/tests/auto/declarative/v4/data/qtbug_22816.qml b/tests/auto/declarative/v4/data/qtbug_22816.qml deleted file mode 100644 index bfa8d4948c..0000000000 --- a/tests/auto/declarative/v4/data/qtbug_22816.qml +++ /dev/null @@ -1,18 +0,0 @@ -import QtQuick 2.0 - -Item { - QtObject { - id: object - property bool prop1: true - function myfunction() { return true; } - property bool prop2: object.prop1 && myfunction(); - } - - property bool test1: object.prop1 && object.prop2 - property bool test2: object.prop1 - - Component.onCompleted: { - object.prop1 = false; - } -} - diff --git a/tests/auto/declarative/v4/data/stringComparison.qml b/tests/auto/declarative/v4/data/stringComparison.qml deleted file mode 100644 index 64b6798c69..0000000000 --- a/tests/auto/declarative/v4/data/stringComparison.qml +++ /dev/null @@ -1,34 +0,0 @@ -import QtQuick 2.0 - -QtObject { - property string string1: "aaba" - property string string2: "aa" - property string string3: "aaab" - property string string4: "c" - - property bool test1: string1 > string2 - property bool test2: string2 < string1 - property bool test3: string1 > string3 - property bool test4: string3 < string1 - property bool test5: string1 < string4 - property bool test6: string4 > string1 - - property bool test7: string1 == "aaba" - property bool test8: string1 != "baa" - property bool test9: string1 === "aaba" - property bool test10: string1 !== "baa" - property bool test11: string4 == "c" - property bool test12: string4 != "d" - property bool test13: string4 === "c" - property bool test14: string4 !== "d" - - property bool test15: string1 >= string2 - property bool test16: string2 <= string1 - property bool test17: string1 >= string3 - property bool test18: string3 <= string1 - property bool test19: string1 <= string4 - property bool test20: string4 >= string1 - property bool test21: string4 <= "c" - property bool test22: string4 >= "c" -} - diff --git a/tests/auto/declarative/v4/data/subscriptionsInConditionalExpressions.qml b/tests/auto/declarative/v4/data/subscriptionsInConditionalExpressions.qml deleted file mode 100644 index a8e05eeda1..0000000000 --- a/tests/auto/declarative/v4/data/subscriptionsInConditionalExpressions.qml +++ /dev/null @@ -1,11 +0,0 @@ -import QtQuick 2.0 - -Item { - id: thisTest - - property bool cond: true - property real a: 1 - property real result: cond ? a : a - - PropertyAction { running: true; target: thisTest; property: "a"; value: 2; } -} diff --git a/tests/auto/declarative/v4/data/unaryMinus.qml b/tests/auto/declarative/v4/data/unaryMinus.qml deleted file mode 100644 index 410654fc3c..0000000000 --- a/tests/auto/declarative/v4/data/unaryMinus.qml +++ /dev/null @@ -1,24 +0,0 @@ -import QtQuick 2.0 - -Item { - property real test1: -i1.p2 - property int test2: -i1.p2 - property real test3: -i1.p1 - property int test4: -i1.p1 - property real test5: -i1.p3 - property int test6: -i1.p3 - property real test7: -i1.p4 - property int test8: -i1.p4 - property real test9: -i1.p5 - property int test10: -i1.p5 - - QtObject { - id: i1 - property real p1: -3.7 - property int p2: 18 - property real p3: -3.3 - property int p4: -7 - property real p5: 4.4 - } - } - diff --git a/tests/auto/declarative/v4/data/unaryPlus.qml b/tests/auto/declarative/v4/data/unaryPlus.qml deleted file mode 100644 index cd5315a7cc..0000000000 --- a/tests/auto/declarative/v4/data/unaryPlus.qml +++ /dev/null @@ -1,24 +0,0 @@ -import QtQuick 2.0 - -Item { - property real test1: +i1.p2 - property int test2: +i1.p2 - property real test3: +i1.p1 - property int test4: +i1.p1 - property real test5: +i1.p3 - property int test6: +i1.p3 - property real test7: +i1.p4 - property int test8: +i1.p4 - property real test9: +i1.p5 - property int test10: +i1.p5 - - QtObject { - id: i1 - property real p1: -3.7 - property int p2: 18 - property real p3: -3.3 - property int p4: -7 - property real p5: 4.4 - } -} - diff --git a/tests/auto/declarative/v4/data/unnecessaryReeval.qml b/tests/auto/declarative/v4/data/unnecessaryReeval.qml deleted file mode 100644 index 48662d7a2d..0000000000 --- a/tests/auto/declarative/v4/data/unnecessaryReeval.qml +++ /dev/null @@ -1,7 +0,0 @@ -import Qt.v4 1.0 - -Result { - property int a: 8 - property int b: 19 - result: (a == 8)?b:7 -} diff --git a/tests/auto/declarative/v4/testtypes.cpp b/tests/auto/declarative/v4/testtypes.cpp deleted file mode 100644 index 6bfd5dc43e..0000000000 --- a/tests/auto/declarative/v4/testtypes.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** 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_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include "testtypes.h" - -#include <QtDeclarative/qdeclarative.h> - -void registerTypes() -{ - qmlRegisterType<ResultObject>("Qt.v4", 1,0, "Result"); - qmlRegisterType<NestedObject>(); -} diff --git a/tests/auto/declarative/v4/testtypes.h b/tests/auto/declarative/v4/testtypes.h deleted file mode 100644 index 02ba721839..0000000000 --- a/tests/auto/declarative/v4/testtypes.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** 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_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef TESTTYPES_H -#define TESTTYPES_H - -#include <QtCore/qobject.h> - -class NestedObject : public QObject -{ - Q_OBJECT - Q_PROPERTY(int dummy READ dummy); - Q_PROPERTY(int result READ result FINAL CONSTANT); - -public: - int dummy() const { return 7; } - int result() const { return 37; } -}; - -class ResultObject : public QObject -{ - Q_OBJECT - Q_PROPERTY(int result READ result WRITE setResult FINAL) - Q_PROPERTY(NestedObject *nested READ nested CONSTANT) -public: - ResultObject() : m_result(0), m_resultCounter(0) {} - - int resultCounter() const { return m_resultCounter; } - void resetResultCounter() { m_resultCounter = 0; } - - int result() const { return m_result; } - void setResult(int result) { m_result = result; m_resultCounter++; } - - NestedObject *nested() { return &m_nested; } - -private: - int m_result; - int m_resultCounter; - - NestedObject m_nested; -}; - -void registerTypes(); - -#endif // TESTTYPES_H - diff --git a/tests/auto/declarative/v4/tst_v4.cpp b/tests/auto/declarative/v4/tst_v4.cpp deleted file mode 100644 index 927dc0f082..0000000000 --- a/tests/auto/declarative/v4/tst_v4.cpp +++ /dev/null @@ -1,353 +0,0 @@ -/**************************************************************************** -** -** 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_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include <qtest.h> -#include <QtCore/qobject.h> -#include <QtCore/qfileinfo.h> -#include <QtCore/qdir.h> -#include <QtDeclarative/qdeclarativeengine.h> -#include <QtDeclarative/qdeclarativecomponent.h> -#include <QtCore/qdebug.h> - -#include <private/qv4compiler_p.h> - -#include "../../shared/util.h" -#include "testtypes.h" - -class tst_v4 : public QDeclarativeDataTest -{ - Q_OBJECT -public: - tst_v4() {} - -private slots: - void initTestCase(); - - void unnecessaryReeval(); - void logicalOr(); - void nestedLogicalOr(); - void conditionalExpr(); - void qtscript(); - void qtscript_data(); - void nestedObjectAccess(); - void subscriptionsInConditionalExpressions(); - void qtbug_21883(); - void qtbug_22816(); - void stringComparison(); - void unaryMinus(); - void unaryPlus(); - -private: - QDeclarativeEngine engine; -}; - -void tst_v4::initTestCase() -{ - QDeclarativeDataTest::initTestCase(); - registerTypes(); -} - -static int v4ErrorsMsgCount = 0; -static void v4ErrorsMsgHandler(QtMsgType, const char *message) -{ - QByteArray m(message); - if (m.contains("QV4")) - v4ErrorsMsgCount++; -} - -void tst_v4::qtscript() -{ - QFETCH(QString, file); - QV4Compiler::enableBindingsTest(true); - - QDeclarativeComponent component(&engine, testFileUrl(file)); - - v4ErrorsMsgCount = 0; - QtMsgHandler old = qInstallMsgHandler(v4ErrorsMsgHandler); - - QObject *o = component.create(); - delete o; - - qInstallMsgHandler(old); - - QCOMPARE(v4ErrorsMsgCount, 0); - - QV4Compiler::enableBindingsTest(false); -} - -void tst_v4::qtscript_data() -{ - QTest::addColumn<QString>("file"); - - QTest::newRow("qreal -> int rounding") << "qrealToIntRounding.qml"; - QTest::newRow("exception on fetch") << "fetchException.qml"; - QTest::newRow("logical or") << "logicalOr.qml"; - QTest::newRow("conditional expressions") << "conditionalExpr.qml"; - QTest::newRow("double bool jump") << "doubleBoolJump.qml"; - QTest::newRow("unary minus") << "unaryMinus.qml"; - QTest::newRow("null qobject") << "nullQObject.qml"; -} - -void tst_v4::unnecessaryReeval() -{ - QDeclarativeComponent component(&engine, testFileUrl("unnecessaryReeval.qml")); - - QObject *o = component.create(); - QVERIFY(o != 0); - - ResultObject *ro = qobject_cast<ResultObject *>(o); - QVERIFY(ro != 0); - - QCOMPARE(ro->resultCounter(), 1); - QCOMPARE(ro->result(), 19); - ro->resetResultCounter(); - - ro->setProperty("b", 6); - - QCOMPARE(ro->resultCounter(), 1); - QCOMPARE(ro->result(), 6); - ro->resetResultCounter(); - - ro->setProperty("a", 14); - - QCOMPARE(ro->resultCounter(), 1); - QCOMPARE(ro->result(), 7); - ro->resetResultCounter(); - - ro->setProperty("b", 14); - QCOMPARE(ro->resultCounter(), 0); - QCOMPARE(ro->result(), 7); - - delete o; -} - -void tst_v4::logicalOr() -{ - { - QDeclarativeComponent component(&engine, testFileUrl("logicalOr.qml")); - - QObject *o = component.create(); - QVERIFY(o != 0); - - ResultObject *ro = qobject_cast<ResultObject *>(o); - QVERIFY(ro != 0); - - QCOMPARE(ro->result(), 0); - delete o; - } - - { - QDeclarativeComponent component(&engine, testFileUrl("logicalOr.2.qml")); - - QObject *o = component.create(); - QVERIFY(o != 0); - - ResultObject *ro = qobject_cast<ResultObject *>(o); - QVERIFY(ro != 0); - - QCOMPARE(ro->result(), 1); - delete o; - } -} - -void tst_v4::nestedLogicalOr() -{ - //we are primarily testing that v4 does not get caught in a loop (QTBUG-24038) - QDeclarativeComponent component(&engine, testFileUrl("nestedLogicalOr.qml")); - - QObject *o = component.create(); - QVERIFY(o != 0); - - ResultObject *ro = qobject_cast<ResultObject *>(o); - QVERIFY(ro != 0); - - QCOMPARE(ro->result(), 1); - delete o; -} - -void tst_v4::conditionalExpr() -{ - { - QDeclarativeComponent component(&engine, testFileUrl("conditionalExpr.qml")); - - QObject *o = component.create(); - QVERIFY(o != 0); - - ResultObject *ro = qobject_cast<ResultObject *>(o); - QVERIFY(ro != 0); - - QCOMPARE(ro->result(), 0); - delete o; - } -} - -// This would previously use the metaObject of the root element to result the nested access. -// That is, the index for accessing "result" would have been RootObject::result, instead of -// NestedObject::result. -void tst_v4::nestedObjectAccess() -{ - QDeclarativeComponent component(&engine, testFileUrl("nestedObjectAccess.qml")); - - QObject *o = component.create(); - QVERIFY(o != 0); - - ResultObject *ro = qobject_cast<ResultObject *>(o); - QVERIFY(ro != 0); - - QCOMPARE(ro->result(), 37); - - delete o; -} - -void tst_v4::subscriptionsInConditionalExpressions() -{ - QDeclarativeComponent component(&engine, testFileUrl("subscriptionsInConditionalExpressions.qml")); - - QObject *o = component.create(); - QVERIFY(o != 0); - - QObject *ro = qobject_cast<QObject *>(o); - QVERIFY(ro != 0); - - QCOMPARE(ro->property("result").toReal(), qreal(2)); - - delete o; -} - -// Crash test -void tst_v4::qtbug_21883() -{ - QDeclarativeComponent component(&engine, testFileUrl("qtbug_21883.qml")); - - QString warning = component.url().toString() + ":4: Unable to assign null to ResultObject*"; - QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); - - QObject *o = component.create(); - QVERIFY(o != 0); - delete o; -} - -void tst_v4::qtbug_22816() -{ - QDeclarativeComponent component(&engine, testFileUrl("qtbug_22816.qml")); - - QObject *o = component.create(); - QVERIFY(o != 0); - QCOMPARE(o->property("test1").toBool(), false); - QCOMPARE(o->property("test2").toBool(), false); - delete o; -} - -void tst_v4::stringComparison() -{ - QDeclarativeComponent component(&engine, testFileUrl("stringComparison.qml")); - - QObject *o = component.create(); - QVERIFY(o != 0); - QCOMPARE(o->property("test1").toBool(), true); - QCOMPARE(o->property("test2").toBool(), true); - QCOMPARE(o->property("test3").toBool(), true); - QCOMPARE(o->property("test4").toBool(), true); - QCOMPARE(o->property("test5").toBool(), true); - QCOMPARE(o->property("test6").toBool(), true); - QCOMPARE(o->property("test7").toBool(), true); - QCOMPARE(o->property("test8").toBool(), true); - QCOMPARE(o->property("test9").toBool(), true); - QCOMPARE(o->property("test10").toBool(), true); - QCOMPARE(o->property("test11").toBool(), true); - QCOMPARE(o->property("test12").toBool(), true); - QCOMPARE(o->property("test13").toBool(), true); - QCOMPARE(o->property("test14").toBool(), true); - QCOMPARE(o->property("test15").toBool(), true); - QCOMPARE(o->property("test16").toBool(), true); - QCOMPARE(o->property("test17").toBool(), true); - QCOMPARE(o->property("test18").toBool(), true); - QCOMPARE(o->property("test19").toBool(), true); - QCOMPARE(o->property("test20").toBool(), true); - QCOMPARE(o->property("test21").toBool(), true); - QCOMPARE(o->property("test22").toBool(), true); - delete o; -} - -void tst_v4::unaryMinus() -{ - QDeclarativeComponent component(&engine, testFileUrl("unaryMinus.qml")); - - QObject *o = component.create(); - QVERIFY(o != 0); - - QCOMPARE(o->property("test1").toReal(), qreal(-18)); - QCOMPARE(o->property("test2").toInt(), -18); - QCOMPARE(o->property("test3").toReal(), qreal(3.7)); - QCOMPARE(o->property("test4").toInt(), 4); - QCOMPARE(o->property("test5").toReal(), qreal(3.3)); - QCOMPARE(o->property("test6").toInt(), 3); - QCOMPARE(o->property("test7").toReal(), qreal(7)); - QCOMPARE(o->property("test8").toInt(), 7); - QCOMPARE(o->property("test9").toReal(), qreal(-4.4)); - QCOMPARE(o->property("test10").toInt(), -4); - - delete o; -} - -void tst_v4::unaryPlus() -{ - QDeclarativeComponent component(&engine, testFileUrl("unaryPlus.qml")); - - QObject *o = component.create(); - QVERIFY(o != 0); - - QCOMPARE(o->property("test1").toReal(), qreal(18)); - QCOMPARE(o->property("test2").toInt(), 18); - QCOMPARE(o->property("test3").toReal(), qreal(-3.7)); - QCOMPARE(o->property("test4").toInt(), -4); - QCOMPARE(o->property("test5").toReal(), qreal(-3.3)); - QCOMPARE(o->property("test6").toInt(), -3); - QCOMPARE(o->property("test7").toReal(), qreal(-7)); - QCOMPARE(o->property("test8").toInt(), -7); - QCOMPARE(o->property("test9").toReal(), qreal(4.4)); - QCOMPARE(o->property("test10").toInt(), 4); - - delete o; -} - -QTEST_MAIN(tst_v4) - -#include "tst_v4.moc" diff --git a/tests/auto/declarative/v4/v4.pro b/tests/auto/declarative/v4/v4.pro deleted file mode 100644 index 81d12f89be..0000000000 --- a/tests/auto/declarative/v4/v4.pro +++ /dev/null @@ -1,17 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativev4 -macx:CONFIG -= app_bundle - -SOURCES += tst_v4.cpp \ - testtypes.cpp -HEADERS += testtypes.h - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private network testlib |