aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testModuleImport.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testModuleImport.js')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testModuleImport.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testModuleImport.js b/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testModuleImport.js
new file mode 100644
index 0000000000..69bc1c9887
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testModuleImport.js
@@ -0,0 +1,8 @@
+.import Qt.test 1.0 as JsQtTest // test that we can import elements from .js files
+
+function importedAttachedPropertyValue(obj) {
+ return obj.JsQtTest.MyQmlObject.value; // attached property, value = 19.
+}
+
+var importedEnumValue = JsQtTest.MyQmlObject.EnumValue3 // the actual value of this enum value is "2"
+