From 11faf8ea7dbff1d81b6e5fbe7c907e5b06be1aa1 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 23 Sep 2009 12:51:48 +1000 Subject: Use .qml file extension in test --- .../declarative/qmlbindengine/data/bindingLoop.qml | 14 ++++++++++++++ .../declarative/qmlbindengine/data/bindingLoop.txt | 14 -------------- .../data/boolPropertiesEvaluateAsBool.1.qml | 5 +++++ .../data/boolPropertiesEvaluateAsBool.1.txt | 5 ----- .../data/boolPropertiesEvaluateAsBool.2.qml | 5 +++++ .../data/boolPropertiesEvaluateAsBool.2.txt | 5 ----- .../qmlbindengine/data/deferredProperties.qml | 7 +++++++ .../qmlbindengine/data/deferredProperties.txt | 7 ------- .../qmlbindengine/data/extensionObjects.qml | 10 ++++++++++ .../qmlbindengine/data/extensionObjects.txt | 10 ---------- .../qmlbindengine/data/idShortcutInvalidates.1.qml | 13 +++++++++++++ .../qmlbindengine/data/idShortcutInvalidates.1.txt | 13 ------------- .../qmlbindengine/data/idShortcutInvalidates.qml | 12 ++++++++++++ .../qmlbindengine/data/idShortcutInvalidates.txt | 12 ------------ .../declarative/qmlbindengine/data/methods.1.qml | 6 ++++++ .../declarative/qmlbindengine/data/methods.1.txt | 6 ------ .../declarative/qmlbindengine/data/methods.2.qml | 6 ++++++ .../declarative/qmlbindengine/data/methods.2.txt | 6 ------ .../qmlbindengine/data/signalAssignment.1.qml | 5 +++++ .../qmlbindengine/data/signalAssignment.1.txt | 5 ----- .../qmlbindengine/data/signalAssignment.2.qml | 5 +++++ .../qmlbindengine/data/signalAssignment.2.txt | 5 ----- .../qmlbindengine/tst_qmlbindengine.cpp | 22 +++++++++++----------- 23 files changed, 99 insertions(+), 99 deletions(-) create mode 100644 tests/auto/declarative/qmlbindengine/data/bindingLoop.qml delete mode 100644 tests/auto/declarative/qmlbindengine/data/bindingLoop.txt create mode 100644 tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.1.qml delete mode 100644 tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.1.txt create mode 100644 tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.2.qml delete mode 100644 tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.2.txt create mode 100644 tests/auto/declarative/qmlbindengine/data/deferredProperties.qml delete mode 100644 tests/auto/declarative/qmlbindengine/data/deferredProperties.txt create mode 100644 tests/auto/declarative/qmlbindengine/data/extensionObjects.qml delete mode 100644 tests/auto/declarative/qmlbindengine/data/extensionObjects.txt create mode 100644 tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.1.qml delete mode 100644 tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.1.txt create mode 100644 tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.qml delete mode 100644 tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.txt create mode 100644 tests/auto/declarative/qmlbindengine/data/methods.1.qml delete mode 100644 tests/auto/declarative/qmlbindengine/data/methods.1.txt create mode 100644 tests/auto/declarative/qmlbindengine/data/methods.2.qml delete mode 100644 tests/auto/declarative/qmlbindengine/data/methods.2.txt create mode 100644 tests/auto/declarative/qmlbindengine/data/signalAssignment.1.qml delete mode 100644 tests/auto/declarative/qmlbindengine/data/signalAssignment.1.txt create mode 100644 tests/auto/declarative/qmlbindengine/data/signalAssignment.2.qml delete mode 100644 tests/auto/declarative/qmlbindengine/data/signalAssignment.2.txt diff --git a/tests/auto/declarative/qmlbindengine/data/bindingLoop.qml b/tests/auto/declarative/qmlbindengine/data/bindingLoop.qml new file mode 100644 index 0000000..8b22dd1 --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/data/bindingLoop.qml @@ -0,0 +1,14 @@ +import Qt.test 1.0 + +MyQmlContainer { + children : [ + MyQmlObject { + id: Object1 + stringProperty: "hello" + Object2.stringProperty + }, + MyQmlObject { + id: Object2 + stringProperty: "hello" + Object1.stringProperty + } + ] +} diff --git a/tests/auto/declarative/qmlbindengine/data/bindingLoop.txt b/tests/auto/declarative/qmlbindengine/data/bindingLoop.txt deleted file mode 100644 index 8b22dd1..0000000 --- a/tests/auto/declarative/qmlbindengine/data/bindingLoop.txt +++ /dev/null @@ -1,14 +0,0 @@ -import Qt.test 1.0 - -MyQmlContainer { - children : [ - MyQmlObject { - id: Object1 - stringProperty: "hello" + Object2.stringProperty - }, - MyQmlObject { - id: Object2 - stringProperty: "hello" + Object1.stringProperty - } - ] -} diff --git a/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.1.qml b/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.1.qml new file mode 100644 index 0000000..3147f63 --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.1.qml @@ -0,0 +1,5 @@ +import Qt.test 1.0 + +MyQmlObject { + stringProperty: trueProperty?'pass':'fail' +} diff --git a/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.1.txt b/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.1.txt deleted file mode 100644 index 3147f63..0000000 --- a/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.1.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Qt.test 1.0 - -MyQmlObject { - stringProperty: trueProperty?'pass':'fail' -} diff --git a/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.2.qml b/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.2.qml new file mode 100644 index 0000000..c89bb49 --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.2.qml @@ -0,0 +1,5 @@ +import Qt.test 1.0 + +MyQmlObject { + stringProperty: falseProperty?'fail':'pass' +} diff --git a/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.2.txt b/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.2.txt deleted file mode 100644 index c89bb49..0000000 --- a/tests/auto/declarative/qmlbindengine/data/boolPropertiesEvaluateAsBool.2.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Qt.test 1.0 - -MyQmlObject { - stringProperty: falseProperty?'fail':'pass' -} diff --git a/tests/auto/declarative/qmlbindengine/data/deferredProperties.qml b/tests/auto/declarative/qmlbindengine/data/deferredProperties.qml new file mode 100644 index 0000000..9dabafe --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/data/deferredProperties.qml @@ -0,0 +1,7 @@ +import Qt.test 1.0 + +MyDeferredObject { + value: 10 + objectProperty: MyQmlObject {} + objectProperty2: MyQmlObject { id: blah } +} diff --git a/tests/auto/declarative/qmlbindengine/data/deferredProperties.txt b/tests/auto/declarative/qmlbindengine/data/deferredProperties.txt deleted file mode 100644 index 9dabafe..0000000 --- a/tests/auto/declarative/qmlbindengine/data/deferredProperties.txt +++ /dev/null @@ -1,7 +0,0 @@ -import Qt.test 1.0 - -MyDeferredObject { - value: 10 - objectProperty: MyQmlObject {} - objectProperty2: MyQmlObject { id: blah } -} diff --git a/tests/auto/declarative/qmlbindengine/data/extensionObjects.qml b/tests/auto/declarative/qmlbindengine/data/extensionObjects.qml new file mode 100644 index 0000000..a902312 --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/data/extensionObjects.qml @@ -0,0 +1,10 @@ +import Qt.test 1.0 + +MyExtendedObject +{ + baseProperty: baseExtendedProperty + baseExtendedProperty: 13 + + coreProperty: extendedProperty + extendedProperty: 9 +} diff --git a/tests/auto/declarative/qmlbindengine/data/extensionObjects.txt b/tests/auto/declarative/qmlbindengine/data/extensionObjects.txt deleted file mode 100644 index a902312..0000000 --- a/tests/auto/declarative/qmlbindengine/data/extensionObjects.txt +++ /dev/null @@ -1,10 +0,0 @@ -import Qt.test 1.0 - -MyExtendedObject -{ - baseProperty: baseExtendedProperty - baseExtendedProperty: 13 - - coreProperty: extendedProperty - extendedProperty: 9 -} diff --git a/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.1.qml b/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.1.qml new file mode 100644 index 0000000..ccb3a22 --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.1.qml @@ -0,0 +1,13 @@ +import Qt.test 1.0 +import Qt 4.6 + +MyQmlObject { + objectProperty: if(1) OtherObject + + property var obj + + obj: Object { + id: OtherObject + } +} + diff --git a/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.1.txt b/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.1.txt deleted file mode 100644 index ccb3a22..0000000 --- a/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.1.txt +++ /dev/null @@ -1,13 +0,0 @@ -import Qt.test 1.0 -import Qt 4.6 - -MyQmlObject { - objectProperty: if(1) OtherObject - - property var obj - - obj: Object { - id: OtherObject - } -} - diff --git a/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.qml b/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.qml new file mode 100644 index 0000000..6c1fca6 --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.qml @@ -0,0 +1,12 @@ +import Qt.test 1.0 +import Qt 4.6 + +MyQmlObject { + objectProperty: OtherObject + + property var obj + + obj: Object { + id: OtherObject + } +} diff --git a/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.txt b/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.txt deleted file mode 100644 index 6c1fca6..0000000 --- a/tests/auto/declarative/qmlbindengine/data/idShortcutInvalidates.txt +++ /dev/null @@ -1,12 +0,0 @@ -import Qt.test 1.0 -import Qt 4.6 - -MyQmlObject { - objectProperty: OtherObject - - property var obj - - obj: Object { - id: OtherObject - } -} diff --git a/tests/auto/declarative/qmlbindengine/data/methods.1.qml b/tests/auto/declarative/qmlbindengine/data/methods.1.qml new file mode 100644 index 0000000..8ba300f --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/data/methods.1.qml @@ -0,0 +1,6 @@ +import Qt.test 1.0 + +MyQmlObject { + id: MyObject + onBasicSignal: MyObject.method() +} diff --git a/tests/auto/declarative/qmlbindengine/data/methods.1.txt b/tests/auto/declarative/qmlbindengine/data/methods.1.txt deleted file mode 100644 index 8ba300f..0000000 --- a/tests/auto/declarative/qmlbindengine/data/methods.1.txt +++ /dev/null @@ -1,6 +0,0 @@ -import Qt.test 1.0 - -MyQmlObject { - id: MyObject - onBasicSignal: MyObject.method() -} diff --git a/tests/auto/declarative/qmlbindengine/data/methods.2.qml b/tests/auto/declarative/qmlbindengine/data/methods.2.qml new file mode 100644 index 0000000..70911f7 --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/data/methods.2.qml @@ -0,0 +1,6 @@ +import Qt.test 1.0 + +MyQmlObject { + id: MyObject + onBasicSignal: MyObject.method(163) +} diff --git a/tests/auto/declarative/qmlbindengine/data/methods.2.txt b/tests/auto/declarative/qmlbindengine/data/methods.2.txt deleted file mode 100644 index 70911f7..0000000 --- a/tests/auto/declarative/qmlbindengine/data/methods.2.txt +++ /dev/null @@ -1,6 +0,0 @@ -import Qt.test 1.0 - -MyQmlObject { - id: MyObject - onBasicSignal: MyObject.method(163) -} diff --git a/tests/auto/declarative/qmlbindengine/data/signalAssignment.1.qml b/tests/auto/declarative/qmlbindengine/data/signalAssignment.1.qml new file mode 100644 index 0000000..fbd0914 --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/data/signalAssignment.1.qml @@ -0,0 +1,5 @@ +import Qt.test 1.0 + +MyQmlObject { + onBasicSignal: setString('pass') +} diff --git a/tests/auto/declarative/qmlbindengine/data/signalAssignment.1.txt b/tests/auto/declarative/qmlbindengine/data/signalAssignment.1.txt deleted file mode 100644 index fbd0914..0000000 --- a/tests/auto/declarative/qmlbindengine/data/signalAssignment.1.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Qt.test 1.0 - -MyQmlObject { - onBasicSignal: setString('pass') -} diff --git a/tests/auto/declarative/qmlbindengine/data/signalAssignment.2.qml b/tests/auto/declarative/qmlbindengine/data/signalAssignment.2.qml new file mode 100644 index 0000000..8addcb9 --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/data/signalAssignment.2.qml @@ -0,0 +1,5 @@ +import Qt.test 1.0 + +MyQmlObject { + onArgumentSignal: setString('pass ' + a + ' ' + b + ' ' + c) +} diff --git a/tests/auto/declarative/qmlbindengine/data/signalAssignment.2.txt b/tests/auto/declarative/qmlbindengine/data/signalAssignment.2.txt deleted file mode 100644 index 8addcb9..0000000 --- a/tests/auto/declarative/qmlbindengine/data/signalAssignment.2.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Qt.test 1.0 - -MyQmlObject { - onArgumentSignal: setString('pass ' + a + ' ' + b + ' ' + c) -} diff --git a/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp b/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp index 2f2bb43..c7d6a87 100644 --- a/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp +++ b/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp @@ -47,7 +47,7 @@ private: void tst_qmlbindengine::idShortcutInvalidates() { { - QmlComponent component(&engine, TEST_FILE("idShortcutInvalidates.txt")); + QmlComponent component(&engine, TEST_FILE("idShortcutInvalidates.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QVERIFY(object->objectProperty() != 0); @@ -56,7 +56,7 @@ void tst_qmlbindengine::idShortcutInvalidates() } { - QmlComponent component(&engine, TEST_FILE("idShortcutInvalidates.1.txt")); + QmlComponent component(&engine, TEST_FILE("idShortcutInvalidates.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QVERIFY(object->objectProperty() != 0); @@ -68,13 +68,13 @@ void tst_qmlbindengine::idShortcutInvalidates() void tst_qmlbindengine::boolPropertiesEvaluateAsBool() { { - QmlComponent component(&engine, TEST_FILE("boolPropertiesEvaluateAsBool.1.txt")); + QmlComponent component(&engine, TEST_FILE("boolPropertiesEvaluateAsBool.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->stringProperty(), QLatin1String("pass")); } { - QmlComponent component(&engine, TEST_FILE("boolPropertiesEvaluateAsBool.2.txt")); + QmlComponent component(&engine, TEST_FILE("boolPropertiesEvaluateAsBool.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->stringProperty(), QLatin1String("pass")); @@ -84,7 +84,7 @@ void tst_qmlbindengine::boolPropertiesEvaluateAsBool() void tst_qmlbindengine::signalAssignment() { { - QmlComponent component(&engine, TEST_FILE("signalAssignment.1.txt")); + QmlComponent component(&engine, TEST_FILE("signalAssignment.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->string(), QString()); @@ -93,7 +93,7 @@ void tst_qmlbindengine::signalAssignment() } { - QmlComponent component(&engine, TEST_FILE("signalAssignment.2.txt")); + QmlComponent component(&engine, TEST_FILE("signalAssignment.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->string(), QString()); @@ -105,7 +105,7 @@ void tst_qmlbindengine::signalAssignment() void tst_qmlbindengine::methods() { { - QmlComponent component(&engine, TEST_FILE("methods.1.txt")); + QmlComponent component(&engine, TEST_FILE("methods.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->methodCalled(), false); @@ -116,7 +116,7 @@ void tst_qmlbindengine::methods() } { - QmlComponent component(&engine, TEST_FILE("methods.2.txt")); + QmlComponent component(&engine, TEST_FILE("methods.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->methodCalled(), false); @@ -129,7 +129,7 @@ void tst_qmlbindengine::methods() void tst_qmlbindengine::bindingLoop() { - QmlComponent component(&engine, TEST_FILE("bindingLoop.txt")); + QmlComponent component(&engine, TEST_FILE("bindingLoop.qml")); QTest::ignoreMessage(QtWarningMsg, "QML MyQmlObject (unknown location): Binding loop detected for property \"stringProperty\" "); QObject *object = component.create(); QVERIFY(object != 0); @@ -337,7 +337,7 @@ void tst_qmlbindengine::objectPropertiesTriggerReeval() void tst_qmlbindengine::deferredProperties() { - QmlComponent component(&engine, TEST_FILE("deferredProperties.txt")); + QmlComponent component(&engine, TEST_FILE("deferredProperties.qml")); MyDeferredObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -354,7 +354,7 @@ void tst_qmlbindengine::deferredProperties() void tst_qmlbindengine::extensionObjects() { - QmlComponent component(&engine, TEST_FILE("extensionObjects.txt")); + QmlComponent component(&engine, TEST_FILE("extensionObjects.qml")); MyExtendedObject *object = qobject_cast(component.create()); QVERIFY(object != 0); -- cgit v0.12