aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/data
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire@kdab.com>2016-02-17 15:45:46 +0100
committerThomas McGuire <thomas.mcguire@kdab.com>2016-02-24 12:11:27 +0000
commit029003851b5f9f5062385884d5591c46c4ebb1d2 (patch)
tree3cd6635c80222ca4d4e40b215876dfe0e4986c34 /tests/auto/qml/qqmllanguage/data
parent90e9b622f01465666f4ae3f88d1710a36bb2ed1f (diff)
Properly signal errors when accessing lowercase enum values
Task-number: QTBUG-46758 Change-Id: I14e394021c231bda5552c8d1c98f20c903a62f12 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data')
-rw-r--r--tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.1.errors.txt1
-rw-r--r--tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.1.qml6
-rw-r--r--tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.2.errors.txt1
-rw-r--r--tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.2.qml6
-rw-r--r--tests/auto/qml/qqmllanguage/data/lowercaseEnumRuntime.1.qml10
-rw-r--r--tests/auto/qml/qqmllanguage/data/lowercaseEnumRuntime.2.qml10
6 files changed, 34 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.1.errors.txt b/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.1.errors.txt
new file mode 100644
index 0000000000..33360e96cf
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.1.errors.txt
@@ -0,0 +1 @@
+5:5:Invalid property assignment: Enum value "lowercaseEnumVal" cannot start with a lowercase letter
diff --git a/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.1.qml b/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.1.qml
new file mode 100644
index 0000000000..f6c3e9b404
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.1.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.0
+import Test 1.0
+
+MyTypeObject {
+ intProperty: MyTypeObject.lowercaseEnumVal
+}
diff --git a/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.2.errors.txt b/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.2.errors.txt
new file mode 100644
index 0000000000..33360e96cf
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.2.errors.txt
@@ -0,0 +1 @@
+5:5:Invalid property assignment: Enum value "lowercaseEnumVal" cannot start with a lowercase letter
diff --git a/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.2.qml b/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.2.qml
new file mode 100644
index 0000000000..0dfe26c71d
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/lowercaseEnumCompileTime.2.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.0
+import Test 1.0
+
+MyTypeObject {
+ enumProperty: MyTypeObjectSingleton.lowercaseEnumVal
+}
diff --git a/tests/auto/qml/qqmllanguage/data/lowercaseEnumRuntime.1.qml b/tests/auto/qml/qqmllanguage/data/lowercaseEnumRuntime.1.qml
new file mode 100644
index 0000000000..866b49e1d5
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/lowercaseEnumRuntime.1.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+import Test 1.0
+
+MyTypeObject {
+ enumProperty: MyTypeObject.EnumVal1
+ Component.onCompleted: {
+ var a = MyTypeObject.EnumVal1;
+ var b = MyTypeObject.lowercaseEnumVal
+ }
+}
diff --git a/tests/auto/qml/qqmllanguage/data/lowercaseEnumRuntime.2.qml b/tests/auto/qml/qqmllanguage/data/lowercaseEnumRuntime.2.qml
new file mode 100644
index 0000000000..686977a11a
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/lowercaseEnumRuntime.2.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+import Test 1.0
+
+MyTypeObject {
+ intProperty: MyTypeObjectSingleton.EnumVal1
+ Component.onCompleted: {
+ var a = MyTypeObjectSingleton.EnumVal1;
+ var b = MyTypeObjectSingleton.lowercaseEnumVal;
+ }
+}