summaryrefslogtreecommitdiff
path: root/tests/auto/qml
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-10-10 12:53:28 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2011-10-18 13:16:18 +0200
commit89ff3cebe6d9ca8385d8d9300cfaa47cf07adb42 (patch)
tree690c6666c71a056a89bd35d5b59072e3ece7e36e /tests/auto/qml
parent4cb8ec6a3271560753df4ebd679c027d9347d140 (diff)
downloadqt-creator-89ff3cebe6d9ca8385d8d9300cfaa47cf07adb42.tar.gz
QmlJS: Introduce UnknownValue.
To distinguish known-to-be-undefined from a genuinely unknown value. Change-Id: I606b4ea4d726f94553400b8950d3c0a4e76564a8 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Diffstat (limited to 'tests/auto/qml')
-rw-r--r--tests/auto/qml/codemodel/check/equality-checks.qml43
1 files changed, 27 insertions, 16 deletions
diff --git a/tests/auto/qml/codemodel/check/equality-checks.qml b/tests/auto/qml/codemodel/check/equality-checks.qml
index 700331780f..e92b1c4cc1 100644
--- a/tests/auto/qml/codemodel/check/equality-checks.qml
+++ b/tests/auto/qml/codemodel/check/equality-checks.qml
@@ -1,11 +1,8 @@
import Qt 4.7
Rectangle {
- onXChanged: {
- if (0 == undefined) {} // 126 15 16
- }
-
- function foo() {
+ function foo(k) {
+ // k is a unknown value
var s = ""
var n = 0
var N = null
@@ -16,45 +13,59 @@ Rectangle {
if (s == s) {}
if (s == n) {} // 126 15 16
if (s == N) {} // ### should warn: always false
- if (s == u) {} // 126 15 16
+ if (s == u) {} // ### should warn: always false
if (s == b) {} // 126 15 16
if (s == o) {} // 126 15 16
+ if (s == k) {} // 126 15 16
if (n == s) {} // 126 15 16
if (n == n) {}
if (n == N) {} // ### should warn: always false
- if (n == u) {} // 126 15 16
+ if (n == u) {} // ### should warn: always false
if (n == b) {} // 126 15 16
if (n == o) {} // 126 15 16
+ if (n == k) {} // 126 15 16
if (N == s) {} // ### should warn: always false
if (N == n) {} // ### should warn: always false
if (N == N) {}
- if (N == u) {} // 126 15 16
+ if (N == u) {} // ### should warn: always true
// ### should warn: always false
if (N == b) {} // 126 15 16
if (N == o) {} // ### should warn: always false
+ if (N == k) {} // 126 15 16
- if (u == s) {} // 126 15 16
- if (u == n) {} // 126 15 16
- if (u == N) {} // 126 15 16
- if (u == u) {} // 126 15 16
- if (u == b) {} // 126 15 16
- if (u == o) {} // 126 15 16
+ if (u == s) {} // ### should warn: always false
+ if (u == n) {} // ### should warn: always false
+ if (u == N) {} // ### should warn: always true
+ if (u == u) {} // ### should warn: always true
+ if (u == b) {} // ### should warn: always false
+ if (u == o) {} // ### should warn: always false
+ if (u == k) {} // 126 15 16
if (b == s) {} // 126 15 16
if (b == n) {} // 126 15 16
// ### should warn: always false
if (b == N) {} // 126 15 16
- if (b == u) {} // 126 15 16
+ if (b == u) {} // ### should warn: always false
if (b == b) {}
if (b == o) {} // 126 15 16
+ if (b == k) {} // 126 15 16
if (o == s) {} // 126 15 16
if (o == n) {} // 126 15 16
if (o == N) {} // ### should warn: always false
- if (o == u) {} // 126 15 16
+ if (o == u) {} // ### should warn: always false
if (o == b) {} // 126 15 16
if (o == o) {}
+ if (o == k) {} // 126 15 16
+
+ if (k == s) {} // 126 15 16
+ if (k == n) {} // 126 15 16
+ if (k == N) {} // 126 15 16
+ if (k == u) {} // 126 15 16
+ if (k == b) {} // 126 15 16
+ if (k == o) {} // 126 15 16
+ if (k == k) {} // 126 15 16
}
}