aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulian de Bhal <julian.debhal@nokia.com>2011-08-22 16:51:03 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-23 03:47:38 +0200
commita3c1573e88284be3f5ef5335baf7fa88f080cdc1 (patch)
treefdf529fcf08c6d388194196bdc12bb6157ca7983 /src
parenta639eccfe1251c00010669efa56e81f9cf27e994 (diff)
QML Autotests: Use fuzzy compare for real numbers
Change-Id: I5ae2859d15502b29e3a744e155ceabe50d83bcff Reviewed-on: http://codereview.qt.nokia.com/3290 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Charles Yin <charles.yin@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/imports/testlib/TestCase.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml
index 1a222a6138..6da66b20de 100644
--- a/src/imports/testlib/TestCase.qml
+++ b/src/imports/testlib/TestCase.qml
@@ -176,7 +176,7 @@ Item {
|| ((typeExp === "object" || typeExp == "declarativeitem") && typeAct === "string")) {
success = (act == exp)
}
- } else if (typeExp === "string" || typeExp === "boolean" || typeExp === "number" ||
+ } else if (typeExp === "string" || typeExp === "boolean" ||
typeExp === "null" || typeExp === "undefined") {
if (exp instanceof act.constructor || act instanceof exp.constructor) {
// to catch short annotaion VS 'new' annotation of act declaration
@@ -188,7 +188,7 @@ Item {
}
} else if (typeExp === "nan") {
success = isNaN(act);
- } else if (typeExp == "number") {
+ } else if (typeExp === "number") {
// Use act fuzzy compare if the two values are floats
if (Math.abs(act - exp) <= 0.00001) {
success = true