summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-03-22 23:26:17 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-03-22 23:26:17 (GMT)
commit190b2667b54eff4540e6b204d0cda39847417a52 (patch)
tree70e85a7e650c4ac3e8f8dae9bd9c4bf32fd355b3 /tests/auto/declarative
parent2b098cd37d86bc7c843225412c90948affb8fef1 (diff)
downloadQt-190b2667b54eff4540e6b204d0cda39847417a52.zip
Qt-190b2667b54eff4540e6b204d0cda39847417a52.tar.gz
Qt-190b2667b54eff4540e6b204d0cda39847417a52.tar.bz2
Manual merge.
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/import/Bar.qml (renamed from tests/auto/declarative/qdeclarativedom/data/importdir/Bar.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml (renamed from tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir/Foo.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir1
-rw-r--r--tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.qml3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNonExist.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp2
9 files changed, 14 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativedom/data/importdir/Bar.qml b/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml
index 2d1a4a3..2d1a4a3 100644
--- a/tests/auto/declarative/qdeclarativedom/data/importdir/Bar.qml
+++ b/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml
diff --git a/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir/Foo.qml b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml
index 2d1a4a3..2d1a4a3 100644
--- a/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir/Foo.qml
+++ b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml
diff --git a/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir
new file mode 100644
index 0000000..5bdd17b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir
@@ -0,0 +1 @@
+Foo Foo.qml
diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
index 6cd0bdb..adea384 100644
--- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
+++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
@@ -340,9 +340,8 @@ void tst_qdeclarativedom::loadImports()
"Item {}";
QDeclarativeEngine engine;
- engine.addImportPath(SRCDIR "/data");
QDeclarativeDomDocument document;
- QVERIFY(document.load(&engine, qml));
+ QVERIFY(document.load(&engine, qml, QUrl::fromLocalFile(SRCDIR "/data/dummy.qml")));
QCOMPARE(document.imports().size(), 5);
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.errors.txt
new file mode 100644
index 0000000..413f096
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.errors.txt
@@ -0,0 +1 @@
+1:1:module "Test" version 2.0 is not installed
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.qml b/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.qml
new file mode 100644
index 0000000..c4a0d38
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.qml
@@ -0,0 +1,3 @@
+import Test 2.0
+
+MyTypeObject { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.errors.txt
new file mode 100644
index 0000000..1baf05c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.errors.txt
@@ -0,0 +1 @@
+2:1:"will-not-be-found": no such directory
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml
new file mode 100644
index 0000000..ec6aa2b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml
@@ -0,0 +1,5 @@
+// imports...
+import "will-not-be-found"
+import Qt 4.6
+
+Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 9188d72..42426a2 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -264,6 +264,8 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("importNamespaceConflict") << "importNamespaceConflict.qml" << "importNamespaceConflict.errors.txt" << false;
QTest::newRow("importVersionMissing (builtin)") << "importVersionMissingBuiltIn.qml" << "importVersionMissingBuiltIn.errors.txt" << false;
QTest::newRow("importVersionMissing (installed)") << "importVersionMissingInstalled.qml" << "importVersionMissingInstalled.errors.txt" << false;
+ QTest::newRow("importNonExist (installed)") << "importNonExist.qml" << "importNonExist.errors.txt" << false;
+ QTest::newRow("importNewerVersion (installed)") << "importNewerVersion.qml" << "importNewerVersion.errors.txt" << false;
QTest::newRow("invalidImportID") << "invalidImportID.qml" << "invalidImportID.errors.txt" << false;
QTest::newRow("signal.1") << "signal.1.qml" << "signal.1.errors.txt" << false;